diff --git a/Gemfile b/Gemfile index 62663e4..d4f76ec 100644 --- a/Gemfile +++ b/Gemfile @@ -29,4 +29,6 @@ group :development, :test do # Tools # gem 'overcommit', '~> 0.59' gem 'pry-rails' + gem 'sorbet' + gem 'tapioca', require: false end diff --git a/bin/srb b/bin/srb new file mode 100755 index 0000000..a011f9a --- /dev/null +++ b/bin/srb @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'srb' 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) =~ /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("sorbet", "srb") diff --git a/bin/srb-rbi b/bin/srb-rbi new file mode 100755 index 0000000..268aad3 --- /dev/null +++ b/bin/srb-rbi @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'srb-rbi' 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) =~ /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("sorbet", "srb-rbi") diff --git a/bin/tapioca b/bin/tapioca new file mode 100755 index 0000000..24617c7 --- /dev/null +++ b/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) =~ /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/extra/hanami_app/Gemfile b/extra/hanami_app/Gemfile new file mode 100644 index 0000000..005c85e --- /dev/null +++ b/extra/hanami_app/Gemfile @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +source 'https://rubygems.org' +git_source(:github) { |repo| "https://github.com/#{repo}.git" } + +gem 'rack' +gem 'webrick' + +gem 'hanami-router' + +gem 'tiny_admin', path: '../../' diff --git a/extra/hanami_app/app.rb b/extra/hanami_app/app.rb index 61ae7d7..1e10a96 100644 --- a/extra/hanami_app/app.rb +++ b/extra/hanami_app/app.rb @@ -1,24 +1,8 @@ # frozen_string_literal: true -# --- dependencies ------------------------------------------------------------- -begin - require 'bundler/inline' -rescue LoadError => e - abort "#{e} - Bundler version 1.10 or later is required. Please update your Bundler" -end - -gemfile(true) do - source 'https://rubygems.org' - - gem 'rack' - gem 'webrick' - - gem 'hanami-router' - - gem 'tiny_admin', path: '../../' -end +require 'bundler' +Bundler.require -# --- Hanami application ------------------------------------------------------- require_relative '../tiny_admin_settings' app = Hanami::Router.new do @@ -27,4 +11,4 @@ mount TinyAdmin::Router, at: '/admin' end -Rack::Server.new(app: app, Port: 3000).start +Rack::Server.new(app: app, Port: 3000).start if __FILE__ == $PROGRAM_NAME diff --git a/extra/rails_app/Gemfile b/extra/rails_app/Gemfile new file mode 100644 index 0000000..7a455aa --- /dev/null +++ b/extra/rails_app/Gemfile @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +source 'https://rubygems.org' +git_source(:github) { |repo| "https://github.com/#{repo}.git" } + +gem 'rails', '~> 7.0' +gem 'webrick' + +gem 'tiny_admin', path: '../../' diff --git a/extra/rails_app/app.rb b/extra/rails_app/app.rb index 8ee6d2b..90fdd52 100644 --- a/extra/rails_app/app.rb +++ b/extra/rails_app/app.rb @@ -1,26 +1,12 @@ # frozen_string_literal: true -# --- dependencies ------------------------------------------------------------- -begin - require 'bundler/inline' -rescue LoadError => e - abort "#{e} - Bundler version 1.10 or later is required. Please update your Bundler" -end - -gemfile(true) do - source 'https://rubygems.org' - - gem 'rails', '~> 7.0' - gem 'webrick' - - gem 'tiny_admin', path: '../../' -end +require 'bundler' +Bundler.require -# --- Rails application -------------------------------------------------------- require 'action_controller/railtie' require_relative '../tiny_admin_settings' -class App < Rails::Application +class RailsApp < Rails::Application routes.append do root to: proc { [200, {}, ['Root page']] } @@ -30,6 +16,6 @@ class App < Rails::Application config.eager_load = false end -App.initialize! +RailsApp.initialize! -Rack::Server.new(app: App, Port: 3000).start +Rack::Server.new(app: RailsApp, Port: 3000).start if __FILE__ == $PROGRAM_NAME diff --git a/extra/roda_app/Gemfile b/extra/roda_app/Gemfile new file mode 100644 index 0000000..651c01b --- /dev/null +++ b/extra/roda_app/Gemfile @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +source 'https://rubygems.org' +git_source(:github) { |repo| "https://github.com/#{repo}.git" } + +gem 'rack' +gem 'rackup' +gem 'webrick' + +gem 'roda' + +gem 'tiny_admin', path: '../../' diff --git a/extra/roda_app/app.rb b/extra/roda_app/app.rb index 004282f..4fc2a32 100644 --- a/extra/roda_app/app.rb +++ b/extra/roda_app/app.rb @@ -1,28 +1,11 @@ # frozen_string_literal: true -# --- dependencies ------------------------------------------------------------- -begin - require 'bundler/inline' -rescue LoadError => e - abort "#{e} - Bundler version 1.10 or later is required. Please update your Bundler" -end - -gemfile(true) do - source 'https://rubygems.org' - - gem 'rack' - gem 'rackup' - gem 'webrick' - - gem 'roda' - - gem 'tiny_admin', path: '../../' -end +require 'bundler' +Bundler.require -# --- Roda application --------------------------------------------------------- require_relative '../tiny_admin_settings' -class App < Roda +class RodaApp < Roda route do |r| r.root do 'Root page' @@ -34,4 +17,4 @@ class App < Roda end end -Rackup::Server.new(app: App, Port: 3000).start +Rackup::Server.new(app: RodaApp, Port: 3000).start if __FILE__ == $PROGRAM_NAME diff --git a/extra/standalone_app/Gemfile b/extra/standalone_app/Gemfile new file mode 100644 index 0000000..1d49483 --- /dev/null +++ b/extra/standalone_app/Gemfile @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +source 'https://rubygems.org' +git_source(:github) { |repo| "https://github.com/#{repo}.git" } + +gem 'rack' +gem 'rackup' +gem 'webrick' + +gem 'tiny_admin', path: '../../' diff --git a/extra/standalone_app/app.rb b/extra/standalone_app/app.rb index 1d83ff1..72120ab 100644 --- a/extra/standalone_app/app.rb +++ b/extra/standalone_app/app.rb @@ -1,27 +1,12 @@ # frozen_string_literal: true -# --- dependencies ------------------------------------------------------------- -begin - require 'bundler/inline' -rescue LoadError => e - abort "#{e} - Bundler version 1.10 or later is required. Please update your Bundler" -end - -gemfile(true) do - source 'https://rubygems.org' - - gem 'rack' - gem 'rackup' - gem 'webrick' - - gem 'tiny_admin', path: '../../' -end +require 'bundler' +Bundler.require -# --- Standalone application --------------------------------------------------- require_relative '../tiny_admin_settings' TinyAdmin.configure do |settings| settings.root_path = '/' end -Rackup::Server.new(app: TinyAdmin::Router, Port: 3000).start +Rackup::Server.new(app: TinyAdmin::Router, Port: 3000).start if __FILE__ == $PROGRAM_NAME diff --git a/lib/tiny_admin.rb b/lib/tiny_admin.rb index 9809665..e730de5 100644 --- a/lib/tiny_admin.rb +++ b/lib/tiny_admin.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true +# typed: true require 'phlex' require 'roda' diff --git a/lib/tiny_admin/support.rb b/lib/tiny_admin/support.rb index a5be97a..cb9d6da 100644 --- a/lib/tiny_admin/support.rb +++ b/lib/tiny_admin/support.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true +# typed: true module TinyAdmin class Support diff --git a/lib/tiny_admin/utils.rb b/lib/tiny_admin/utils.rb index d4aa948..d9cb0e7 100644 --- a/lib/tiny_admin/utils.rb +++ b/lib/tiny_admin/utils.rb @@ -1,7 +1,10 @@ # frozen_string_literal: true +# typed: true module TinyAdmin module Utils + include Kernel + def params_to_s(params) list = params.each_with_object([]) do |(param, value), result| if value.is_a?(Hash) diff --git a/lib/tiny_admin/version.rb b/lib/tiny_admin/version.rb index 4ed157c..f3bba63 100644 --- a/lib/tiny_admin/version.rb +++ b/lib/tiny_admin/version.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true +# typed: true module TinyAdmin VERSION = '0.7.0' diff --git a/sorbet/config b/sorbet/config new file mode 100644 index 0000000..019c966 --- /dev/null +++ b/sorbet/config @@ -0,0 +1,9 @@ +--dir +. +--ignore=_misc/ +--ignore=bin/ +--ignore=coverage/ +--ignore=extra/ +--ignore=tmp/ +--ignore=vendor/ +--ignore=spec/ diff --git a/sorbet/rbi/annotations/actionmailer.rbi b/sorbet/rbi/annotations/actionmailer.rbi new file mode 100644 index 0000000..e806f99 --- /dev/null +++ b/sorbet/rbi/annotations/actionmailer.rbi @@ -0,0 +1,10 @@ +# typed: strict + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +class ActionMailer::Base + sig { params(headers: T.untyped, block: T.nilable(T.proc.void)).returns(Mail::Message) } + def mail(headers = nil, &block); end +end diff --git a/sorbet/rbi/annotations/actionpack.rbi b/sorbet/rbi/annotations/actionpack.rbi new file mode 100644 index 0000000..c4f5212 --- /dev/null +++ b/sorbet/rbi/annotations/actionpack.rbi @@ -0,0 +1,428 @@ +# typed: strict + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +class ActionController::API + MODULES = T.let(T.unsafe(nil), T::Array[T.untyped]) +end + +module ActionController::Flash::ClassMethods + sig { params(types: Symbol).void } + def add_flash_types(*types); end +end + +module ActionController::Helpers::ClassMethods + sig { returns(ActionView::Base) } + def helpers; end +end + +class ActionController::Metal < AbstractController::Base + sig { returns(ActionController::Parameters) } + def params; end + + sig { returns(ActionDispatch::Request) } + def request; end + + sig { returns(ActionDispatch::Response) } + def response; end +end + +module ActionController::MimeResponds + sig { params(mimes: T.nilable(Symbol), block: T.nilable(T.proc.params(arg0: ActionController::MimeResponds::Collector).void)).void } + def respond_to(*mimes, &block); end +end + +class ActionController::Parameters + sig { params(other: T.any(String, ActionController::Parameters)).returns(T::Boolean) } + def ==(other); end + + sig { params(key: T.any(String, Symbol), value: T.untyped).void } + def []=(key, value); end + + sig { returns(T.nilable(T::Array[T.any(String, Symbol)])) } + def always_permitted_parameters; end + + sig { params(obj: T.nilable(T::Array[T.any(String, Symbol)])).void } + def always_permitted_parameters=(obj); end + + sig { returns(T.untyped) } + def deep_dup; end + + sig { params(key: T.any(String, Symbol), block: T.untyped).returns(T.untyped) } + def delete(key, &block); end + + sig { params(keys: T.any(String, Symbol)).returns(T.untyped) } + def dig(*keys); end + + sig { params(block: T.untyped).returns(T.untyped) } + def each_pair(&block); end + + # each is an alias of each_pair + sig { params(block: T.untyped).returns(T.untyped) } + def each(&block); end + + sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) } + def except(*keys); end + + sig { params(keys: T.any(String, Symbol)).returns(T.untyped) } + def extract!(*keys); end + + sig { params(key: T.any(String, Symbol), args: T.untyped).returns(T.untyped) } + def fetch(key, *args); end + + sig { returns(String) } + def inspect; end + + sig { params(other_hash: T.untyped).returns(ActionController::Parameters) } + def merge!(other_hash); end + + sig { params(other_hash: T.untyped).returns(ActionController::Parameters) } + def merge(other_hash); end + + sig { returns(T.untyped) } + def parameters; end + + sig { returns(T.self_type) } + def permit!; end + + # You can pass _a lot_ of stuff to permit, so filters is left untyped for now. + sig { params(filters: T.untyped).returns(ActionController::Parameters) } + def permit(*filters); end + + sig { params(new_permitted: T.untyped).void } + def permitted=(new_permitted); end + + sig { returns(T::Boolean) } + def permitted?; end + + sig { params(block: T.untyped).returns(T.untyped) } + def reject!(&block); end + + # delete_if is an alias of reject! + sig { params(block: T.untyped).returns(T.untyped) } + def delete_if(&block); end + + sig { params(block: T.untyped).returns(T.untyped) } + def reject(&block); end + + sig { params(key: T.any(String, Symbol)).returns(T.untyped) } + def [](key); end + + sig { params(key: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(T.untyped) } + def require(key); end + + # required is an alias of require + sig { params(key: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(T.untyped) } + def required(key); end + + sig { params(other_hash: T.untyped).returns(ActionController::Parameters) } + def reverse_merge!(other_hash); end + + # with_defaults! is an alias of reverse_merge! + sig { params(other_hash: T.untyped).returns(ActionController::Parameters) } + def with_defaults!(other_hash); end + + sig { params(other_hash: T.untyped).returns(ActionController::Parameters) } + def reverse_merge(other_hash); end + + # with_defaults is an alias of reverse_merge + sig { params(other_hash: T.untyped).returns(ActionController::Parameters) } + def with_defaults(other_hash); end + + sig { params(block: T.untyped).returns(T.nilable(ActionController::Parameters)) } + def select!(&block); end + + # keep_if is an alias of select! + sig { params(block: T.untyped).returns(T.nilable(ActionController::Parameters)) } + def keep_if(&block); end + + sig { params(block: T.untyped).returns(ActionController::Parameters) } + def select(&block); end + + sig { returns(T.any(Symbol, T::Boolean)) } + def self.action_on_unpermitted_parameters; end + + sig { params(obj: T.any(Symbol, T::Boolean)).void } + def self.action_on_unpermitted_parameters=(obj); end + + sig { returns(T::Array[T.any(String, Symbol)]) } + def self.always_permitted_parameters; end + + sig { params(obj: T::Array[T.any(String, Symbol)]).void } + def self.always_permitted_parameters=(obj); end + + sig { returns(T::Boolean) } + def self.permit_all_parameters; end + + sig { params(obj: T::Boolean).void } + def self.permit_all_parameters=(obj); end + + sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) } + def slice!(*keys); end + + sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) } + def slice(*keys); end + + sig { 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 +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/sorbet/rbi/annotations/actionview.rbi b/sorbet/rbi/annotations/actionview.rbi new file mode 100644 index 0000000..eb3b6b9 --- /dev/null +++ b/sorbet/rbi/annotations/actionview.rbi @@ -0,0 +1,77 @@ +# typed: strong + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +module ActionView + TemplateError = T.type_alias { + Template::Error +} + + class MissingTemplate < ActionView::ActionViewError + sig { returns(String) } + def path; end + end +end + +class ActionView::Helpers::FormBuilder + sig { returns(T.untyped) } + def object; end +end + +module ActionView::Helpers::NumberHelper + sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) } + def number_to_currency(number, options = T.unsafe(nil)); end + + sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) } + def number_to_human(number, options = T.unsafe(nil)); end + + sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) } + def number_to_human_size(number, options = T.unsafe(nil)); end + + sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) } + def number_to_percentage(number, options = T.unsafe(nil)); end + + sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) } + def number_to_phone(number, options = T.unsafe(nil)); end + + sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) } + def number_with_delimiter(number, options = T.unsafe(nil)); end + + sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) } + def number_with_precision(number, options = T.unsafe(nil)); end +end + +module ActionView::Helpers::SanitizeHelper + mixes_in_class_methods ActionView::Helpers::SanitizeHelper::ClassMethods +end + +module ActionView::Helpers::UrlHelper + extend ActiveSupport::Concern + include ActionView::Helpers::TagHelper + mixes_in_class_methods ActionView::Helpers::UrlHelper::ClassMethods + + sig { params(name: 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/sorbet/rbi/annotations/activemodel.rbi b/sorbet/rbi/annotations/activemodel.rbi new file mode 100644 index 0000000..d90bcfe --- /dev/null +++ b/sorbet/rbi/annotations/activemodel.rbi @@ -0,0 +1,91 @@ +# typed: strict + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +class 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/sorbet/rbi/annotations/activerecord.rbi b/sorbet/rbi/annotations/activerecord.rbi new file mode 100644 index 0000000..82e9f9c --- /dev/null +++ b/sorbet/rbi/annotations/activerecord.rbi @@ -0,0 +1,77 @@ +# typed: strict + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +class ActiveRecord::Schema + sig { params(info: T::Hash[T.untyped, T.untyped], blk: T.proc.bind(ActiveRecord::Schema).void).void } + def self.define(info = nil, &blk); end +end + +class ActiveRecord::Migration + # @shim: Methods on migration are delegated to `SchemaStatements` using `method_missing` + include ActiveRecord::ConnectionAdapters::SchemaStatements + + # @shim: Methods on migration are delegated to `DatabaseaStatements` using `method_missing` + include ActiveRecord::ConnectionAdapters::DatabaseStatements +end + +class ActiveRecord::Base + sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } + def self.after_initialize(*args, **options, &block); end + + sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } + def self.after_find(*args, **options, &block); end + + sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } + def self.after_touch(*args, **options, &block); end + + sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } + def self.before_validation(*args, **options, &block); end + + sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } + def self.after_validation(*args, **options, &block); end + + sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } + def self.before_save(*args, **options, &block); end + + sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } + def self.around_save(*args, **options, &block); end + + sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } + def self.after_save(*args, **options, &block); end + + sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } + def self.before_create(*args, **options, &block); end + + sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } + def self.around_create(*args, **options, &block); end + + sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } + def self.after_create(*args, **options, &block); end + + sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } + def self.before_update(*args, **options, &block); end + + sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } + def self.around_update(*args, **options, &block); end + + sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } + def self.after_update(*args, **options, &block); end + + sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } + def self.before_destroy(*args, **options, &block); end + + sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } + def self.around_destroy(*args, **options, &block); end + + sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } + def self.after_destroy(*args, **options, &block); end + + sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } + def self.after_commit(*args, **options, &block); end + + sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void } + def self.after_rollback(*args, **options, &block); end +end diff --git a/sorbet/rbi/annotations/activesupport.rbi b/sorbet/rbi/annotations/activesupport.rbi new file mode 100644 index 0000000..ac7c6e4 --- /dev/null +++ b/sorbet/rbi/annotations/activesupport.rbi @@ -0,0 +1,136 @@ +# typed: strict + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +module ActiveSupport::Testing::Declarative + sig { params(name: String, block: T.proc.bind(T.untyped).void).void } + def test(name, &block); end +end + +class ActiveSupport::EnvironmentInquirer + sig { returns(T::Boolean) } + def development?; end + + sig { returns(T::Boolean) } + def production?; end + + sig { returns(T::Boolean) } + def test?; end + + # @method_missing: delegated to String through ActiveSupport::StringInquirer + sig { returns(T::Boolean) } + def staging?; end +end + +module ActiveSupport::Testing::SetupAndTeardown::ClassMethods + sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.untyped).void)).void } + def setup(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.untyped).void)).void } + def teardown(*args, &block); end +end + +class ActiveSupport::TestCase + sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).void)).void } + def self.setup(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).void)).void } + def self.teardown(*args, &block); end + + sig { params(name: String, block: T.proc.bind(T.attached_class).void).void } + def self.test(name, &block); end +end + +class 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 +end + +class Object + sig { returns(T::Boolean) } + def blank?; end + + sig { returns(T::Boolean) } + def present?; end +end + +class Hash + sig { returns(T::Boolean) } + def extractable_options?; end +end + +class Array + sig { params(position: Integer).returns(T.self_type) } + def from(position); end + + sig { params(position: Integer).returns(T.self_type) } + def to(position); end + + sig { params(elements: T.untyped).returns(T::Array[T.untyped]) } + def including(*elements); end + + sig { params(elements: T.untyped).returns(T.self_type) } + def excluding(*elements); end + + sig { params(elements: T.untyped).returns(T.self_type) } + def without(*elements); end + + sig { returns(T.nilable(Elem)) } + def second; end + + sig { returns(T.nilable(Elem)) } + def third; end + + sig { returns(T.nilable(Elem)) } + def fourth; end + + sig { returns(T.nilable(Elem)) } + def fifth; end + + sig { returns(T.nilable(Elem)) } + def forty_two; end + + sig { returns(T.nilable(Elem)) } + def third_to_last; end + + sig { returns(T.nilable(Elem)) } + def second_to_last; end + + sig { params(options: T::Hash[T.untyped, T.untyped]).returns(String) } + def to_sentence(options = {}); end + + sig { params(format: Symbol).returns(String) } + def to_fs(format = :default); end + + sig { params(format: Symbol).returns(String) } + def to_formatted_s(format = :default); end + + sig { returns(String) } + def to_xml; end + + sig { returns(T::Hash[T.untyped, T.untyped]) } + def extract_options!; end + + sig { type_parameters(:FillType).params(number: Integer, fill_with: T.type_parameter(:FillType), block: T.nilable(T.proc.params(group: T::Array[T.any(Elem, T.type_parameter(:FillType))]).void)).returns(T::Array[T::Array[T.any(Elem, T.type_parameter(:FillType))]]) } + def in_groups(number, fill_with = T.unsafe(nil), &block); end + + sig { type_parameters(:FillType).params(number: Integer, fill_with: T.type_parameter(:FillType), block: T.nilable(T.proc.params(group: T::Array[T.any(Elem, T.type_parameter(:FillType))]).void)).returns(T::Array[T::Array[T.any(Elem, T.type_parameter(:FillType))]]) } + def in_groups_of(number, fill_with = T.unsafe(nil), &block); end + + sig { params(value: T.untyped, block: T.nilable(T.proc.params(element: Elem).returns(T.untyped))).returns(T::Array[T::Array[Elem]]) } + def split(value = nil, &block); end + + sig { params(object: T.untyped).returns(T::Array[T.untyped]) } + def self.wrap(object); end + + sig { returns(T.untyped) } + def extract!; end + + sig { returns(ActiveSupport::ArrayInquirer) } + def inquiry; end +end diff --git a/sorbet/rbi/annotations/globalid.rbi b/sorbet/rbi/annotations/globalid.rbi new file mode 100644 index 0000000..e70d46b --- /dev/null +++ b/sorbet/rbi/annotations/globalid.rbi @@ -0,0 +1,30 @@ +# typed: strict + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +class ActiveRecord::Base + # @shim: this is included at runtime https://github.com/rails/globalid/blob/v1.0.0/lib/global_id/railtie.rb#L38 + include GlobalID::Identification +end + +module GlobalID::Identification + sig { params(options: T::Hash[T.untyped, T.untyped]).returns(GlobalID) } + def to_gid(options = {}); end + + sig { params(options: T::Hash[T.untyped, T.untyped]).returns(String) } + def to_gid_param(options = {}); end + + sig { params(options: T::Hash[T.untyped, T.untyped]).returns(GlobalID) } + def to_global_id(options = {}); end + + sig { params(options: T::Hash[T.untyped, T.untyped]).returns(SignedGlobalID) } + def to_sgid(options = {}); end + + sig { params(options: T::Hash[T.untyped, T.untyped]).returns(String) } + def to_sgid_param(options = {}); end + + sig { params(options: T::Hash[T.untyped, T.untyped]).returns(SignedGlobalID) } + def to_signed_global_id(options = {}); end +end diff --git a/sorbet/rbi/annotations/railties.rbi b/sorbet/rbi/annotations/railties.rbi new file mode 100644 index 0000000..f71f135 --- /dev/null +++ b/sorbet/rbi/annotations/railties.rbi @@ -0,0 +1,58 @@ +# typed: strong + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +module Rails + class << self + sig { returns(Rails::Application) } + def application; end + + sig { returns(ActiveSupport::BacktraceCleaner) } + def backtrace_cleaner; end + + sig { returns(ActiveSupport::Cache::Store) } + def cache; end + + sig { returns(ActiveSupport::EnvironmentInquirer) } + def env; end + + sig { returns(ActiveSupport::Logger) } + def logger; end + + sig { returns(Pathname) } + def root; end + + sig { returns(String) } + def version; end + end +end + +class Rails::Application < ::Rails::Engine + class << self + sig { params(block: T.proc.bind(Rails::Application).void).void } + def configure(&block); end + end + + sig { params(block: T.proc.bind(Rails::Application).void).void } + def configure(&block); end + + sig { returns(T.untyped) } + def config; end +end + +class Rails::Engine < ::Rails::Railtie + sig { params(block: T.untyped).returns(ActionDispatch::Routing::RouteSet) } + def routes(&block); end +end + +class Rails::Railtie + sig { params(block: T.proc.bind(Rails::Railtie).void).void } + def configure(&block); end +end + +class Rails::Railtie::Configuration + sig { params(blk: T.proc.bind(ActiveSupport::Reloader).void).void } + def to_prepare(&blk); end +end diff --git a/sorbet/rbi/annotations/rainbow.rbi b/sorbet/rbi/annotations/rainbow.rbi new file mode 100644 index 0000000..60ba90a --- /dev/null +++ b/sorbet/rbi/annotations/rainbow.rbi @@ -0,0 +1,269 @@ +# typed: strict + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +module Rainbow + # @shim: https://github.com/sickill/rainbow/blob/master/lib/rainbow.rb#L10-L12 + sig { returns(T::Boolean) } + attr_accessor :enabled + + class Color + sig { returns(Symbol) } + attr_reader :ground + + sig { params(ground: Symbol, values: T.any([Integer], [Integer, Integer, Integer])).returns(Color) } + def self.build(ground, values); end + + sig { params(hex: String).returns([Integer, Integer, Integer]) } + def self.parse_hex_color(hex); end + + class Indexed < Rainbow::Color + sig { returns(Integer) } + attr_reader :num + + sig { params(ground: Symbol, num: Integer).void } + def initialize(ground, num); end + + sig { returns(T::Array[Integer]) } + def codes; end + end + + class Named < Rainbow::Color::Indexed + NAMES = T.let(nil, T::Hash[Symbol, Integer]) + + sig { params(ground: Symbol, name: Symbol).void } + def initialize(ground, name); end + + sig { returns(T::Array[Symbol]) } + def self.color_names; end + + sig { returns(String) } + def self.valid_names; end + end + + class RGB < Rainbow::Color::Indexed + sig { returns(Integer) } + attr_reader :r, :g, :b + + sig { params(ground: Symbol, values: Integer).void } + def initialize(ground, *values); end + + sig { returns(T::Array[Integer]) } + def codes; end + + sig { params(value: Numeric).returns(Integer) } + def self.to_ansi_domain(value); end + end + + class X11Named < Rainbow::Color::RGB + include Rainbow::X11ColorNames + + sig { returns(T::Array[Symbol]) } + def self.color_names; end + + sig { returns(String) } + def self.valid_names; end + + sig { params(ground: Symbol, name: Symbol).void } + def initialize(ground, name); end + end + end + + sig { returns(Wrapper) } + def self.global; end + + sig { returns(T::Boolean) } + def self.enabled; end + + sig { params(value: T::Boolean).returns(T::Boolean) } + def self.enabled=(value); end + + sig { params(string: String).returns(String) } + def self.uncolor(string); end + + class NullPresenter < String + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def color(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def foreground(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def fg(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def background(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def bg(*values); end + + sig { returns(NullPresenter) } + def reset; end + + sig { returns(NullPresenter) } + def bright; end + + sig { returns(NullPresenter) } + def faint; end + + sig { returns(NullPresenter) } + def italic; end + + sig { returns(NullPresenter) } + def underline; end + + sig { returns(NullPresenter) } + def blink; end + + sig { returns(NullPresenter) } + def inverse; end + + sig { returns(NullPresenter) } + def hide; end + + sig { returns(NullPresenter) } + def cross_out; end + + sig { returns(NullPresenter) } + def black; end + + sig { returns(NullPresenter) } + def red; end + + sig { returns(NullPresenter) } + def green; end + + sig { returns(NullPresenter) } + def yellow; end + + sig { returns(NullPresenter) } + def blue; end + + sig { returns(NullPresenter) } + def magenta; end + + sig { returns(NullPresenter) } + def cyan; end + + sig { returns(NullPresenter) } + def white; end + + sig { returns(NullPresenter) } + def bold; end + + sig { returns(NullPresenter) } + def dark; end + + sig { returns(NullPresenter) } + def strike; end + end + + class Presenter < String + TERM_EFFECTS = T.let(nil, T::Hash[Symbol, Integer]) + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def color(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def foreground(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def fg(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def background(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def bg(*values); end + + sig { returns(Presenter) } + def reset; end + + sig { returns(Presenter) } + def bright; end + + sig { returns(Presenter) } + def faint; end + + sig { returns(Presenter) } + def italic; end + + sig { returns(Presenter) } + def underline; end + + sig { returns(Presenter) } + def blink; end + + sig { returns(Presenter) } + def inverse; end + + sig { returns(Presenter) } + def hide; end + + sig { returns(Presenter) } + def cross_out; end + + sig { returns(Presenter) } + def black; end + + sig { returns(Presenter) } + def red; end + + sig { returns(Presenter) } + def green; end + + sig { returns(Presenter) } + def yellow; end + + sig { returns(Presenter) } + def blue; end + + sig { returns(Presenter) } + def magenta; end + + sig { returns(Presenter) } + def cyan; end + + sig { returns(Presenter) } + def white; end + + sig { returns(Presenter) } + def bold; end + + sig { returns(Presenter) } + def dark; end + + sig { returns(Presenter) } + def strike; end + end + + class StringUtils + sig { params(string: String, codes: T::Array[Integer]).returns(String) } + def self.wrap_with_sgr(string, codes); end + + sig { params(string: String).returns(String) } + def self.uncolor(string); end + end + + VERSION = T.let(nil, String) + + class Wrapper + sig { returns(T::Boolean) } + attr_accessor :enabled + + sig { params(enabled: T::Boolean).void } + def initialize(enabled = true); end + + sig { params(string: String).returns(T.any(Rainbow::Presenter, Rainbow::NullPresenter)) } + def wrap(string); end + end + + module X11ColorNames + NAMES = T.let(nil, T::Hash[Symbol, [Integer, Integer, Integer]]) + end +end + +sig { params(string: String).returns(Rainbow::Presenter) } +def Rainbow(string); end diff --git a/sorbet/rbi/gems/actioncable@7.0.4.3.rbi b/sorbet/rbi/gems/actioncable@7.0.4.3.rbi new file mode 100644 index 0000000..bb99ced --- /dev/null +++ b/sorbet/rbi/gems/actioncable@7.0.4.3.rbi @@ -0,0 +1,8 @@ +# 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/sorbet/rbi/gems/actionmailbox@7.0.4.3.rbi b/sorbet/rbi/gems/actionmailbox@7.0.4.3.rbi new file mode 100644 index 0000000..2d8eb4f --- /dev/null +++ b/sorbet/rbi/gems/actionmailbox@7.0.4.3.rbi @@ -0,0 +1,8 @@ +# 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`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/actionmailer@7.0.4.3.rbi b/sorbet/rbi/gems/actionmailer@7.0.4.3.rbi new file mode 100644 index 0000000..2246788 --- /dev/null +++ b/sorbet/rbi/gems/actionmailer@7.0.4.3.rbi @@ -0,0 +1,8 @@ +# 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`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/actionpack@7.0.4.3.rbi b/sorbet/rbi/gems/actionpack@7.0.4.3.rbi new file mode 100644 index 0000000..7aff15c --- /dev/null +++ b/sorbet/rbi/gems/actionpack@7.0.4.3.rbi @@ -0,0 +1,19654 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `actionpack` gem. +# Please instead update this file by running `bin/tapioca gem actionpack`. + +# source://actionpack//lib/abstract_controller.rb#8 +module AbstractController + extend ::ActiveSupport::Autoload + + class << self + # source://actionpack//lib/abstract_controller.rb#24 + def eager_load!; end + end +end + +# Raised when a non-existing controller action is triggered. +# +# source://actionpack//lib/abstract_controller/base.rb#11 +class AbstractController::ActionNotFound < ::StandardError + include ::DidYouMean::Correctable + + # @return [ActionNotFound] a new instance of ActionNotFound + # + # source://actionpack//lib/abstract_controller/base.rb#14 + def initialize(message = T.unsafe(nil), controller = T.unsafe(nil), action = T.unsafe(nil)); end + + # source://actionpack//lib/abstract_controller/base.rb#12 + def action; end + + # source://actionpack//lib/abstract_controller/base.rb#12 + def controller; end + + # source://actionpack//lib/abstract_controller/base.rb#23 + def corrections; end +end + +# source://actionpack//lib/abstract_controller/asset_paths.rb#4 +module AbstractController::AssetPaths + extend ::ActiveSupport::Concern +end + +# AbstractController::Base is a low-level API. Nobody should be +# using it directly, and subclasses (like ActionController::Base) are +# expected to provide their own +render+ method, since rendering means +# different things depending on the context. +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://actionpack//lib/abstract_controller/base.rb#33 +class AbstractController::Base + include ::ActiveSupport::Configurable + extend ::ActiveSupport::Configurable::ClassMethods + extend ::ActiveSupport::DescendantsTracker + + # Delegates to the class's ::action_methods. + # + # source://actionpack//lib/abstract_controller/base.rb#161 + def action_methods; end + + # Returns the name of the action this controller is processing. + # + # source://activesupport/7.0.4.3/lib/active_support/core_ext/module/attr_internal.rb#33 + def action_name; end + + # source://activesupport/7.0.4.3/lib/active_support/core_ext/module/attr_internal.rb#33 + def action_name=(_arg0); end + + # Returns true if a method for the action is available and + # can be dispatched, false otherwise. + # + # Notice that action_methods.include?("foo") may return + # false and available_action?("foo") returns true because + # this method considers actions that are also available + # through other means, for example, implicit render ones. + # + # ==== Parameters + # * action_name - The name of an action to be tested + # + # @return [Boolean] + # + # source://actionpack//lib/abstract_controller/base.rb#175 + def available_action?(action_name); end + + # Delegates to the class's ::controller_path. + # + # source://actionpack//lib/abstract_controller/base.rb#156 + def controller_path; end + + # Returns the formats that can be processed by the controller. + # + # source://activesupport/7.0.4.3/lib/active_support/core_ext/module/attr_internal.rb#33 + def formats; end + + # source://activesupport/7.0.4.3/lib/active_support/core_ext/module/attr_internal.rb#33 + def formats=(_arg0); end + + # source://actionpack//lib/abstract_controller/base.rb#194 + def inspect; end + + # Tests if a response body is set. Used to determine if the + # +process_action+ callback needs to be terminated in + # AbstractController::Callbacks. + # + # @return [Boolean] + # + # source://actionpack//lib/abstract_controller/base.rb#182 + def performed?; end + + # Calls the action going through the entire action dispatch stack. + # + # The actual method that is called is determined by calling + # #method_for_action. If no method can handle the action, then an + # AbstractController::ActionNotFound error is raised. + # + # ==== Returns + # * self + # + # source://actionpack//lib/abstract_controller/base.rb#142 + def process(action, *args, **_arg2); end + + # Returns the body of the HTTP response sent by the controller. + # + # source://activesupport/7.0.4.3/lib/active_support/core_ext/module/attr_internal.rb#33 + def response_body; end + + # source://activesupport/7.0.4.3/lib/active_support/core_ext/module/attr_internal.rb#33 + def response_body=(_arg0); end + + # Actually call the method associated with the action. Override + # this method if you wish to change how action methods are called, + # not to add additional behavior around it. For example, you would + # override #send_action if you want to inject arguments into the + # method. + def send_action(*_arg0); end + + private + + # Takes an action name and returns the name of the method that will + # handle the action. + # + # It checks if the action name is valid and returns false otherwise. + # + # See method_for_action for more information. + # + # ==== Parameters + # * action_name - An action name to find a method name for + # + # ==== Returns + # * string - The name of the method that handles the action + # * false - No valid method name could be found. + # Raise +AbstractController::ActionNotFound+. + # + # source://actionpack//lib/abstract_controller/base.rb#246 + def _find_action_name(action_name); end + + # If the action name was not found, but a method called "action_missing" + # was found, #method_for_action will return "_handle_action_missing". + # This method calls #action_missing with the current action name. + # + # source://actionpack//lib/abstract_controller/base.rb#228 + def _handle_action_missing(*args); end + + # Checks if the action name is valid and returns false otherwise. + # + # @return [Boolean] + # + # source://actionpack//lib/abstract_controller/base.rb#282 + def _valid_action_name?(action_name); end + + # Returns true if the name can be considered an action because + # it has a method defined in the controller. + # + # ==== Parameters + # * name - The name of an action to be tested + # + # @return [Boolean] + # + # source://actionpack//lib/abstract_controller/base.rb#204 + def action_method?(name); end + + # Takes an action name and returns the name of the method that will + # handle the action. In normal cases, this method returns the same + # name as it receives. By default, if #method_for_action receives + # a name that is not an action, it will look for an #action_missing + # method and return "_handle_action_missing" if one is found. + # + # Subclasses may override this method to add additional conditions + # that should be considered an action. For instance, an HTTP controller + # with a template matching the action name is considered to exist. + # + # If you override this method to handle additional cases, you may + # also provide a method (like +_handle_method_missing+) to handle + # the case. + # + # If none of these conditions are true, and +method_for_action+ + # returns +nil+, an +AbstractController::ActionNotFound+ exception will be raised. + # + # ==== Parameters + # * action_name - An action name to find a method name for + # + # ==== Returns + # * string - The name of the method that handles the action + # * nil - No method name could be found. + # + # source://actionpack//lib/abstract_controller/base.rb#273 + def method_for_action(action_name); end + + # Call the action. Override this in a subclass to modify the + # behavior around processing an action. This, and not #process, + # is the intended way to override action dispatching. + # + # Notice that the first argument is the method to be dispatched + # which is *not* necessarily the same as the action name. + # + # source://actionpack//lib/abstract_controller/base.rb#214 + def process_action(*_arg0, **_arg1, &_arg2); end + + class << self + # Returns the value of attribute abstract. + # + # source://actionpack//lib/abstract_controller/base.rb#50 + def abstract; end + + # Define a controller as abstract. See internal_methods for more + # details. + # + # source://actionpack//lib/abstract_controller/base.rb#55 + def abstract!; end + + # Returns the value of attribute abstract. + # + # source://actionpack//lib/abstract_controller/base.rb#50 + def abstract?; end + + # A list of method names that should be considered actions. This + # includes all public instance methods on a controller, less + # any internal methods (see internal_methods), adding back in + # any methods that are internal, but still exist on the class + # itself. + # + # ==== Returns + # * Set - A set of all methods that should be considered actions. + # + # source://actionpack//lib/abstract_controller/base.rb#89 + def action_methods; end + + # action_methods are cached and there is sometimes a need to refresh + # them. ::clear_action_methods! allows you to do that, so next time + # you run action_methods, they will be recalculated. + # + # source://actionpack//lib/abstract_controller/base.rb#107 + def clear_action_methods!; end + + # Returns the full controller name, underscored, without the ending Controller. + # + # class MyApp::MyPostsController < AbstractController::Base + # + # end + # + # MyApp::MyPostsController.controller_path # => "my_app/my_posts" + # + # ==== Returns + # * String + # + # source://actionpack//lib/abstract_controller/base.rb#121 + def controller_path; end + + # source://actionpack//lib/abstract_controller/base.rb#59 + def inherited(klass); end + + # A list of all internal methods for a controller. This finds the first + # abstract superclass of a controller, and gets a list of all public + # instance methods on that abstract class. Public instance methods of + # a controller would normally be considered action methods, so methods + # declared on abstract classes are being removed. + # (ActionController::Metal and ActionController::Base are defined as abstract) + # + # source://actionpack//lib/abstract_controller/base.rb#74 + def internal_methods; end + + # Refresh the cached action_methods when a new action_method is added. + # + # source://actionpack//lib/abstract_controller/base.rb#126 + def method_added(name); end + + # Returns true if the given controller is capable of rendering + # a path. A subclass of +AbstractController::Base+ + # may return false. An Email controller for example does not + # support paths, only full URLs. + # + # @return [Boolean] + # + # source://actionpack//lib/abstract_controller/base.rb#190 + def supports_path?; end + end +end + +# source://actionpack//lib/abstract_controller/caching.rb#4 +module AbstractController::Caching + include ::AbstractController::Caching::ConfigMethods + extend ::ActiveSupport::Concern + extend ::ActiveSupport::Autoload + include GeneratedInstanceMethods + include ::AbstractController::Caching::Fragments + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::Caching::Fragments::ClassMethods + mixes_in_class_methods ::AbstractController::Caching::ClassMethods + mixes_in_class_methods ::AbstractController::Caching::ConfigMethods + + # source://actionpack//lib/abstract_controller/caching.rb#52 + def view_cache_dependencies; end + + private + + # Convenience accessor. + # + # source://actionpack//lib/abstract_controller/caching.rb#58 + def cache(key, options = T.unsafe(nil), &block); end + + module GeneratedClassMethods + def _view_cache_dependencies; end + def _view_cache_dependencies=(value); end + def _view_cache_dependencies?; end + def fragment_cache_keys; end + def fragment_cache_keys=(value); end + def fragment_cache_keys?; end + end + + module GeneratedInstanceMethods + def _view_cache_dependencies; end + def _view_cache_dependencies=(value); end + def _view_cache_dependencies?; end + def fragment_cache_keys; end + def fragment_cache_keys=(value); end + def fragment_cache_keys?; end + end +end + +# source://actionpack//lib/abstract_controller/caching.rb#46 +module AbstractController::Caching::ClassMethods + # source://actionpack//lib/abstract_controller/caching.rb#47 + def view_cache_dependency(&dependency); end +end + +# source://actionpack//lib/abstract_controller/caching.rb#12 +module AbstractController::Caching::ConfigMethods + # source://actionpack//lib/abstract_controller/caching.rb#13 + def cache_store; end + + # source://actionpack//lib/abstract_controller/caching.rb#17 + def cache_store=(store); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/abstract_controller/caching.rb#22 + def cache_configured?; end +end + +# Fragment caching is used for caching various blocks within +# views without caching the entire action as a whole. This is +# useful when certain elements of an action change frequently or +# depend on complicated state while other parts rarely change or +# can be shared amongst multiple parties. The caching is done using +# the +cache+ helper available in the Action View. See +# ActionView::Helpers::CacheHelper for more information. +# +# While it's strongly recommended that you use key-based cache +# expiration (see links in CacheHelper for more information), +# it is also possible to manually expire caches. For example: +# +# expire_fragment('name_of_cache') +# +# source://actionpack//lib/abstract_controller/caching/fragments.rb#18 +module AbstractController::Caching::Fragments + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::Caching::Fragments::ClassMethods + + # Given a key (as described in +expire_fragment+), returns + # a key array suitable for use in reading, writing, or expiring a + # cached fragment. All keys begin with :views, + # followed by ENV["RAILS_CACHE_ID"] or ENV["RAILS_APP_VERSION"] if set, + # followed by any controller-wide key prefix values, ending + # with the specified +key+ value. + # + # source://actionpack//lib/abstract_controller/caching/fragments.rb#68 + def combined_fragment_cache_key(key); end + + # Removes fragments from the cache. + # + # +key+ can take one of three forms: + # + # * String - This would normally take the form of a path, like + # pages/45/notes. + # * Hash - Treated as an implicit call to +url_for+, like + # { controller: 'pages', action: 'notes', id: 45} + # * Regexp - Will remove any fragment that matches, so + # %r{pages/\d*/notes} might remove all notes. Make sure you + # don't use anchors in the regex (^ or $) because + # the actual filename matched looks like + # ./cache/filename/path.cache. Note: Regexp expiration is + # only supported on caches that can iterate over all keys (unlike + # memcached). + # + # +options+ is passed through to the cache store's +delete+ + # method (or delete_matched, for Regexp keys). + # + # source://actionpack//lib/abstract_controller/caching/fragments.rb#132 + def expire_fragment(key, options = T.unsafe(nil)); end + + # Check if a cached fragment from the location signified by + # +key+ exists (see +expire_fragment+ for acceptable formats). + # + # @return [Boolean] + # + # source://actionpack//lib/abstract_controller/caching/fragments.rb#105 + def fragment_exist?(key, options = T.unsafe(nil)); end + + # source://actionpack//lib/abstract_controller/caching/fragments.rb#145 + def instrument_fragment_cache(name, key, &block); end + + # Reads a cached fragment from the location signified by +key+ + # (see +expire_fragment+ for acceptable formats). + # + # source://actionpack//lib/abstract_controller/caching/fragments.rb#93 + def read_fragment(key, options = T.unsafe(nil)); end + + # Writes +content+ to the location signified by + # +key+ (see +expire_fragment+ for acceptable formats). + # + # source://actionpack//lib/abstract_controller/caching/fragments.rb#80 + def write_fragment(key, content, options = T.unsafe(nil)); end + + module GeneratedClassMethods + def fragment_cache_keys; end + def fragment_cache_keys=(value); end + def fragment_cache_keys?; end + end + + module GeneratedInstanceMethods + def fragment_cache_keys; end + def fragment_cache_keys=(value); end + def fragment_cache_keys?; end + end +end + +# source://actionpack//lib/abstract_controller/caching/fragments.rb#35 +module AbstractController::Caching::Fragments::ClassMethods + # Allows you to specify controller-wide key prefixes for + # cache fragments. Pass either a constant +value+, or a block + # which computes a value each time a cache key is generated. + # + # For example, you may want to prefix all fragment cache keys + # with a global version identifier, so you can easily + # invalidate all caches. + # + # class ApplicationController + # fragment_cache_key "v1" + # end + # + # When it's time to invalidate all fragments, simply change + # the string constant. Or, progressively roll out the cache + # invalidation using a computed value: + # + # class ApplicationController + # fragment_cache_key do + # @account.id.odd? ? "v1" : "v2" + # end + # end + # + # source://actionpack//lib/abstract_controller/caching/fragments.rb#57 + def fragment_cache_key(value = T.unsafe(nil), &key); end +end + +# = Abstract Controller Callbacks +# +# Abstract Controller provides hooks during the life cycle of a controller action. +# Callbacks allow you to trigger logic during this cycle. Available callbacks are: +# +# * after_action +# * append_after_action +# * append_around_action +# * append_before_action +# * around_action +# * before_action +# * prepend_after_action +# * prepend_around_action +# * prepend_before_action +# * skip_after_action +# * skip_around_action +# * skip_before_action +# +# NOTE: Calling the same callback multiple times will overwrite previous callback definitions. +# +# source://actionpack//lib/abstract_controller/callbacks.rb#24 +module AbstractController::Callbacks + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActiveSupport::Callbacks + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods + mixes_in_class_methods ::ActiveSupport::DescendantsTracker + mixes_in_class_methods ::AbstractController::Callbacks::ClassMethods + + private + + # Override AbstractController::Base#process_action to run the + # process_action callbacks around the normal behavior. + # + # source://actionpack//lib/abstract_controller/callbacks.rb#232 + def process_action(*_arg0, **_arg1, &_arg2); end + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + def __callbacks?; end + end + + module GeneratedInstanceMethods + def __callbacks; end + def __callbacks?; end + end +end + +# source://actionpack//lib/abstract_controller/callbacks.rb#38 +class AbstractController::Callbacks::ActionFilter + # @return [ActionFilter] a new instance of ActionFilter + # + # source://actionpack//lib/abstract_controller/callbacks.rb#39 + def initialize(actions); end + + # @return [Boolean] + # + # source://actionpack//lib/abstract_controller/callbacks.rb#43 + def after(controller); end + + # @return [Boolean] + # + # source://actionpack//lib/abstract_controller/callbacks.rb#43 + def around(controller); end + + # @return [Boolean] + # + # source://actionpack//lib/abstract_controller/callbacks.rb#43 + def before(controller); end + + # @return [Boolean] + # + # source://actionpack//lib/abstract_controller/callbacks.rb#43 + def match?(controller); end +end + +# source://actionpack//lib/abstract_controller/callbacks.rb#52 +module AbstractController::Callbacks::ClassMethods + # Take callback names and an optional callback proc, normalize them, + # then call the block with each callback. This allows us to abstract + # the normalization across several methods that use it. + # + # ==== Parameters + # * callbacks - An array of callbacks, with an optional + # options hash as the last parameter. + # * block - A proc that should be added to the callbacks. + # + # ==== Block Parameters + # * name - The callback to be added. + # * options - A hash of options to be used when adding the callback. + # + # source://actionpack//lib/abstract_controller/callbacks.rb#96 + def _insert_callbacks(callbacks, block = T.unsafe(nil)); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#77 + def _normalize_callback_option(options, from, to); end + + # If +:only+ or +:except+ are used, convert the options into the + # +:if+ and +:unless+ options of ActiveSupport::Callbacks. + # + # The basic idea is that :only => :index gets converted to + # :if => proc {|c| c.action_name == "index" }. + # + # Note that :only has priority over :if in case they + # are used together. + # + # only: :index, if: -> { true } # the :if option will be ignored. + # + # Note that :if has priority over :except in case they + # are used together. + # + # except: :index, if: -> { true } # the :except option will be ignored. + # + # ==== Options + # * only - The callback should be run only for this action. + # * except - The callback should be run for all actions except this action. + # + # source://actionpack//lib/abstract_controller/callbacks.rb#72 + def _normalize_callback_options(options); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#204 + def after_action(*names, &blk); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#204 + def append_after_action(*names, &blk); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#204 + def append_around_action(*names, &blk); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#204 + def append_before_action(*names, &blk); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#204 + def around_action(*names, &blk); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#204 + def before_action(*names, &blk); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#210 + def prepend_after_action(*names, &blk); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#210 + def prepend_around_action(*names, &blk); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#210 + def prepend_before_action(*names, &blk); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#218 + def skip_after_action(*names); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#218 + def skip_around_action(*names); end + + # source://actionpack//lib/abstract_controller/callbacks.rb#218 + def skip_before_action(*names); end +end + +# source://actionpack//lib/abstract_controller/collector.rb#6 +module AbstractController::Collector + # source://actionpack//lib/abstract_controller/collector.rb#10 + def atom(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def bmp(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def css(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def csv(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def gif(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def gzip(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def html(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def ics(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def jpeg(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def js(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def json(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def m4a(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def mp3(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def mp4(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def mpeg(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def multipart_form(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def ogg(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def otf(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def pdf(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def png(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def rss(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def svg(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def text(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def tiff(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def ttf(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def url_encoded_form(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def vcf(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def vtt(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def webm(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def woff(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def woff2(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def xml(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def yaml(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/collector.rb#10 + def zip(*args, **_arg1, &block); end + + private + + # source://actionpack//lib/abstract_controller/collector.rb#26 + def method_missing(symbol, *args, **_arg2, &block); end + + class << self + # source://actionpack//lib/abstract_controller/collector.rb#7 + def generate_method_for_mime(mime); end + end +end + +# source://actionpack//lib/abstract_controller/rendering.rb#9 +class AbstractController::DoubleRenderError < ::AbstractController::Error + # @return [DoubleRenderError] a new instance of DoubleRenderError + # + # source://actionpack//lib/abstract_controller/rendering.rb#12 + def initialize(message = T.unsafe(nil)); end +end + +# source://actionpack//lib/abstract_controller/rendering.rb#10 +AbstractController::DoubleRenderError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/abstract_controller/error.rb#4 +class AbstractController::Error < ::StandardError; end + +# source://actionpack//lib/abstract_controller/helpers.rb#7 +module AbstractController::Helpers + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::Helpers::ClassMethods + + # source://actionpack//lib/abstract_controller/helpers.rb#40 + def _helpers; end + + module GeneratedClassMethods + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + end + + module GeneratedInstanceMethods + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + end +end + +# source://actionpack//lib/abstract_controller/helpers.rb#44 +module AbstractController::Helpers::ClassMethods + # Sets the attribute _helpers + # + # @param value the value to set the attribute _helpers to. + # + # source://actionpack//lib/abstract_controller/helpers.rb#56 + def _helpers=(_arg0); end + + # source://actionpack//lib/abstract_controller/helpers.rb#184 + def _helpers_for_modification; end + + # Clears up all existing helpers in this class, only keeping the helper + # with the same name as this class. + # + # source://actionpack//lib/abstract_controller/helpers.rb#158 + def clear_helpers; end + + # Includes the given modules in the template class. + # + # Modules can be specified in different ways. All of the following calls + # include +FooHelper+: + # + # # Module, recommended. + # helper FooHelper + # + # # String/symbol without the "helper" suffix, camel or snake case. + # helper "Foo" + # helper :Foo + # helper "foo" + # helper :foo + # + # The last two assume that "foo".camelize returns "Foo". + # + # When strings or symbols are passed, the method finds the actual module + # object using String#constantize. Therefore, if the module has not been + # yet loaded, it has to be autoloadable, which is normally the case. + # + # Namespaces are supported. The following calls include +Foo::BarHelper+: + # + # # Module, recommended. + # helper Foo::BarHelper + # + # # String/symbol without the "helper" suffix, camel or snake case. + # helper "Foo::Bar" + # helper :"Foo::Bar" + # helper "foo/bar" + # helper :"foo/bar" + # + # The last two assume that "foo/bar".camelize returns "Foo::Bar". + # + # The method accepts a block too. If present, the block is evaluated in + # the context of the controller helper module. This simple call makes the + # +wadus+ method available in templates of the enclosing controller: + # + # helper do + # def wadus + # "wadus" + # end + # end + # + # Furthermore, all the above styles can be mixed together: + # + # helper FooHelper, "woo", "bar/baz" do + # def wadus + # "wadus" + # end + # end + # + # source://actionpack//lib/abstract_controller/helpers.rb#147 + def helper(*args, &block); end + + # Declare a controller method as a helper. For example, the following + # makes the +current_user+ and +logged_in?+ controller methods available + # to the view: + # class ApplicationController < ActionController::Base + # helper_method :current_user, :logged_in? + # + # def current_user + # @current_user ||= User.find_by(id: session[:user]) + # end + # + # def logged_in? + # current_user != nil + # end + # end + # + # In a view: + # <% if logged_in? -%>Welcome, <%= current_user.name %><% end -%> + # + # ==== Parameters + # * method[, method] - A name or names of a method on the controller + # to be made available on the view. + # + # source://actionpack//lib/abstract_controller/helpers.rb#79 + def helper_method(*methods); end + + # When a class is inherited, wrap its helper module in a new module. + # This ensures that the parent class's module can be changed + # independently of the child class's. + # + # source://actionpack//lib/abstract_controller/helpers.rb#48 + def inherited(klass); end + + # Given an array of values like the ones accepted by +helper+, this method + # returns an array with the corresponding modules, in the same order. + # + # source://actionpack//lib/abstract_controller/helpers.rb#169 + def modules_for_helpers(modules_or_helper_prefixes); end + + private + + # source://actionpack//lib/abstract_controller/helpers.rb#203 + def default_helper_module!; end + + # source://actionpack//lib/abstract_controller/helpers.rb#192 + def define_helpers_module(klass, helpers = T.unsafe(nil)); end +end + +# source://actionpack//lib/abstract_controller/helpers.rb#26 +class AbstractController::Helpers::MissingHelperError < ::LoadError + # @return [MissingHelperError] a new instance of MissingHelperError + # + # source://actionpack//lib/abstract_controller/helpers.rb#27 + def initialize(error, path); end +end + +# source://actionpack//lib/abstract_controller/logger.rb#6 +module AbstractController::Logger + extend ::ActiveSupport::Concern + include ::ActiveSupport::Benchmarkable +end + +# source://actionpack//lib/abstract_controller/rendering.rb#17 +module AbstractController::Rendering + extend ::ActiveSupport::Concern + include ::ActionView::ViewPaths + + mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods + + # Normalizes arguments, options and then delegates render_to_body and + # sticks the result in self.response_body. + # + # source://actionpack//lib/abstract_controller/rendering.rb#23 + def render(*args, &block); end + + # Performs the actual template rendering. + # + # source://actionpack//lib/abstract_controller/rendering.rb#51 + def render_to_body(options = T.unsafe(nil)); end + + # Raw rendering of a template to a string. + # + # It is similar to render, except that it does not + # set the +response_body+ and it should be guaranteed + # to always return a string. + # + # If a component extends the semantics of +response_body+ + # (as ActionController extends it to be anything that + # responds to the method each), this method needs to be + # overridden in order to still return a string. + # + # source://actionpack//lib/abstract_controller/rendering.rb#45 + def render_to_string(*args, &block); end + + # Returns Content-Type of rendered content. + # + # source://actionpack//lib/abstract_controller/rendering.rb#55 + def rendered_format; end + + # This method should return a hash with assigns. + # You can overwrite this configuration per controller. + # + # source://actionpack//lib/abstract_controller/rendering.rb#63 + def view_assigns; end + + private + + # Normalize args by converting render "foo" to + # render :action => "foo" and render "foo/bar" to + # render :file => "foo/bar". + # + # source://actionpack//lib/abstract_controller/rendering.rb#75 + def _normalize_args(action = T.unsafe(nil), options = T.unsafe(nil)); end + + # Normalize options. + # + # source://actionpack//lib/abstract_controller/rendering.rb#90 + def _normalize_options(options); end + + # Normalize args and options. + # + # source://actionpack//lib/abstract_controller/rendering.rb#116 + def _normalize_render(*args, &block); end + + # Process the rendered format. + # + # source://actionpack//lib/abstract_controller/rendering.rb#100 + def _process_format(format); end + + # Process extra options. + # + # source://actionpack//lib/abstract_controller/rendering.rb#95 + def _process_options(options); end + + # source://actionpack//lib/abstract_controller/rendering.rb#103 + def _process_variant(options); end + + # source://actionpack//lib/abstract_controller/rendering.rb#123 + def _protected_ivars; end + + # source://actionpack//lib/abstract_controller/rendering.rb#106 + def _set_html_content_type; end + + # source://actionpack//lib/abstract_controller/rendering.rb#112 + def _set_rendered_content_type(format); end + + # source://actionpack//lib/abstract_controller/rendering.rb#109 + def _set_vary_header; end +end + +# source://actionpack//lib/abstract_controller/rendering.rb#59 +AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/abstract_controller/translation.rb#6 +module AbstractController::Translation + # Delegates to I18n.localize. Also aliased as l. + # + # source://actionpack//lib/abstract_controller/translation.rb#33 + def l(object, **options); end + + # Delegates to I18n.localize. Also aliased as l. + # + # source://actionpack//lib/abstract_controller/translation.rb#33 + def localize(object, **options); end + + # source://actionpack//lib/abstract_controller/translation.rb#7 + def raise_on_missing_translations; end + + # source://actionpack//lib/abstract_controller/translation.rb#7 + def raise_on_missing_translations=(val); end + + # Delegates to I18n.translate. Also aliased as t. + # + # When the given key starts with a period, it will be scoped by the current + # controller and action. So if you call translate(".foo") from + # PeopleController#index, it will convert the call to + # I18n.translate("people.index.foo"). This makes it less repetitive + # to translate many keys within the same controller / action and gives you a + # simple framework for scoping them consistently. + # + # source://actionpack//lib/abstract_controller/translation.rb#17 + def t(key, **options); end + + # Delegates to I18n.translate. Also aliased as t. + # + # When the given key starts with a period, it will be scoped by the current + # controller and action. So if you call translate(".foo") from + # PeopleController#index, it will convert the call to + # I18n.translate("people.index.foo"). This makes it less repetitive + # to translate many keys within the same controller / action and gives you a + # simple framework for scoping them consistently. + # + # source://actionpack//lib/abstract_controller/translation.rb#17 + def translate(key, **options); end + + class << self + # source://actionpack//lib/abstract_controller/translation.rb#7 + def raise_on_missing_translations; end + + # source://actionpack//lib/abstract_controller/translation.rb#7 + def raise_on_missing_translations=(val); end + end +end + +# Includes +url_for+ into the host class (e.g. an abstract controller or mailer). The class +# has to provide a +RouteSet+ by implementing the _routes methods. Otherwise, an +# exception will be raised. +# +# Note that this module is completely decoupled from HTTP - the only requirement is a valid +# _routes implementation. +# +# source://actionpack//lib/abstract_controller/url_for.rb#10 +module AbstractController::UrlFor + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActionDispatch::Routing::UrlFor + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::UrlFor::ClassMethods + + # source://actionpack//lib/abstract_controller/url_for.rb#14 + def _routes; end + + module GeneratedClassMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end + + module GeneratedInstanceMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end +end + +# source://actionpack//lib/abstract_controller/url_for.rb#19 +module AbstractController::UrlFor::ClassMethods + # source://actionpack//lib/abstract_controller/url_for.rb#20 + def _routes; end + + # source://actionpack//lib/abstract_controller/url_for.rb#24 + def action_methods; end +end + +# source://actionpack//lib/action_controller/metal/exceptions.rb#3 +module ActionController + extend ::ActiveSupport::Autoload + + class << self + # See Renderers.add + # + # source://actionpack//lib/action_controller/metal/renderers.rb#7 + def add_renderer(key, &block); end + + # See Renderers.remove + # + # source://actionpack//lib/action_controller/metal/renderers.rb#12 + def remove_renderer(key); end + end +end + +# API Controller is a lightweight version of ActionController::Base, +# created for applications that don't require all functionalities that a complete +# \Rails controller provides, allowing you to create controllers with just the +# features that you need for API only applications. +# +# An API Controller is different from a normal controller in the sense that +# by default it doesn't include a number of features that are usually required +# by browser access only: layouts and templates rendering, +# flash, assets, and so on. This makes the entire controller stack thinner, +# suitable for API applications. It doesn't mean you won't have such +# features if you need them: they're all available for you to include in +# your application, they're just not part of the default API controller stack. +# +# Normally, +ApplicationController+ is the only controller that inherits from +# ActionController::API. All other controllers in turn inherit from +# +ApplicationController+. +# +# A sample controller could look like this: +# +# class PostsController < ApplicationController +# def index +# posts = Post.all +# render json: posts +# end +# end +# +# Request, response, and parameters objects all work the exact same way as +# ActionController::Base. +# +# == Renders +# +# The default API Controller stack includes all renderers, which means you +# can use render :json and siblings freely in your controllers. Keep +# in mind that templates are not going to be rendered, so you need to ensure +# your controller is calling either render or redirect_to in +# all actions, otherwise it will return 204 No Content. +# +# def show +# post = Post.find(params[:id]) +# render json: post +# end +# +# == Redirects +# +# Redirects are used to move from one action to another. You can use the +# redirect_to method in your controllers in the same way as in +# ActionController::Base. For example: +# +# def create +# redirect_to root_url and return if not_authorized? +# # do stuff here +# end +# +# == Adding New Behavior +# +# In some scenarios you may want to add back some functionality provided by +# ActionController::Base that is not present by default in +# ActionController::API, for instance MimeResponds. This +# module gives you the respond_to method. Adding it is quite simple, +# you just need to include the module in a specific controller or in +# +ApplicationController+ in case you want it available in your entire +# application: +# +# class ApplicationController < ActionController::API +# include ActionController::MimeResponds +# end +# +# class PostsController < ApplicationController +# def index +# posts = Post.all +# +# respond_to do |format| +# format.json { render json: posts } +# format.xml { render xml: posts } +# end +# end +# end +# +# Make sure to check the modules included in ActionController::Base +# if you want to use any other functionality that is not provided +# by ActionController::API out of the box. +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://actionpack//lib/action_controller/api.rb#89 +class ActionController::API < ::ActionController::Metal + include ::ActionView::ViewPaths + include ::AbstractController::Rendering + include ::ActionDispatch::Routing::PolymorphicRoutes + include ::ActionDispatch::Routing::UrlFor + include ::AbstractController::UrlFor + include ::ActionController::UrlFor + include ::AbstractController::Logger + include ::ActiveSupport::Benchmarkable + include ::ActionController::Redirecting + include ::ActionController::ApiRendering + include ::ActionController::Rendering + include ::ActionController::Renderers + include ::ActionController::Renderers::All + include ::ActionController::Head + include ::ActionController::ConditionalGet + include ::ActionController::BasicImplicitRender + include ::ActionController::StrongParameters + include ::ActionController::DataStreaming + include ::ActionController::DefaultHeaders + include ::ActionController::Logging + include ::ActiveSupport::Callbacks + include ::AbstractController::Callbacks + include ::ActiveSupport::Rescuable + include ::ActionController::Rescue + include ::ActionController::Instrumentation + include ::ActionController::ParamsWrapper + extend ::ActionView::ViewPaths::ClassMethods + extend ::AbstractController::UrlFor::ClassMethods + extend ::ActionController::Rendering::ClassMethods + extend ::ActionController::Renderers::ClassMethods + extend ::ActionController::ConditionalGet::ClassMethods + extend ::ActionController::DefaultHeaders::ClassMethods + extend ::ActionController::Logging::ClassMethods + extend ::ActiveSupport::Callbacks::ClassMethods + extend ::AbstractController::Callbacks::ClassMethods + extend ::ActiveSupport::Rescuable::ClassMethods + extend ::ActionController::Instrumentation::ClassMethods + extend ::ActionController::ParamsWrapper::ClassMethods + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks?; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#940 + def _process_action_callbacks; end + + # source://actionpack//lib/action_controller/metal/renderers.rb#31 + def _renderers; end + + # source://actionpack//lib/action_controller/metal/renderers.rb#31 + def _renderers=(_arg0); end + + # source://actionpack//lib/action_controller/metal/renderers.rb#31 + def _renderers?; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#928 + def _run_process_action_callbacks(&block); end + + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options; end + + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options=(_arg0); end + + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options?; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options=(_arg0); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options?; end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 + def etaggers; end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 + def etaggers=(_arg0); end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 + def etaggers?; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def logger; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def logger=(value); end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#13 + def raise_on_open_redirects; end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#13 + def raise_on_open_redirects=(val); end + + # source://activesupport/7.0.4.3/lib/active_support/rescuable.rb#13 + def rescue_handlers; end + + # source://activesupport/7.0.4.3/lib/active_support/rescuable.rb#13 + def rescue_handlers=(_arg0); end + + # source://activesupport/7.0.4.3/lib/active_support/rescuable.rb#13 + def rescue_handlers?; end + + class << self + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks?; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#932 + def _process_action_callbacks; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#936 + def _process_action_callbacks=(value); end + + # source://actionpack//lib/action_controller/metal/renderers.rb#31 + def _renderers; end + + # source://actionpack//lib/action_controller/metal/renderers.rb#31 + def _renderers=(value); end + + # source://actionpack//lib/action_controller/metal/renderers.rb#31 + def _renderers?; end + + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options; end + + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options=(value); end + + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options?; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options=(value); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options?; end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 + def etaggers; end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 + def etaggers=(value); end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 + def etaggers?; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def logger; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def logger=(value); end + + # source://actionpack//lib/action_controller/metal.rb#210 + def middleware_stack; end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#13 + def raise_on_open_redirects; end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#13 + def raise_on_open_redirects=(val); end + + # source://activesupport/7.0.4.3/lib/active_support/rescuable.rb#13 + def rescue_handlers; end + + # source://activesupport/7.0.4.3/lib/active_support/rescuable.rb#13 + def rescue_handlers=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/rescuable.rb#13 + def rescue_handlers?; end + + # Shortcut helper that returns all the ActionController::API modules except + # the ones passed as arguments: + # + # class MyAPIBaseController < ActionController::Metal + # ActionController::API.without_modules(:UrlFor).each do |left| + # include left + # end + # end + # + # This gives better control over what you want to exclude and makes it easier + # to create an API controller class, instead of listing the modules required + # manually. + # + # source://actionpack//lib/action_controller/api.rb#104 + def without_modules(*modules); end + end +end + +# source://actionpack//lib/action_controller/api.rb#112 +ActionController::API::MODULES = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_controller/metal/exceptions.rb#4 +class ActionController::ActionControllerError < ::StandardError; end + +# source://actionpack//lib/action_controller/api/api_rendering.rb#4 +module ActionController::ApiRendering + extend ::ActiveSupport::Concern + include ::ActionController::Rendering + + mixes_in_class_methods ::ActionController::Rendering::ClassMethods + + # source://actionpack//lib/action_controller/api/api_rendering.rb#11 + def render_to_body(options = T.unsafe(nil)); end +end + +# source://actionpack//lib/action_controller/metal/exceptions.rb#7 +class ActionController::BadRequest < ::ActionController::ActionControllerError + # @return [BadRequest] a new instance of BadRequest + # + # source://actionpack//lib/action_controller/metal/exceptions.rb#8 + def initialize(msg = T.unsafe(nil)); end +end + +# Action Controllers are the core of a web request in \Rails. They are made up of one or more actions that are executed +# on request and then either it renders a template or redirects to another action. An action is defined as a public method +# on the controller, which will automatically be made accessible to the web-server through \Rails Routes. +# +# By default, only the ApplicationController in a \Rails application inherits from ActionController::Base. All other +# controllers inherit from ApplicationController. This gives you one class to configure things such as +# request forgery protection and filtering of sensitive request parameters. +# +# A sample controller could look like this: +# +# class PostsController < ApplicationController +# def index +# @posts = Post.all +# end +# +# def create +# @post = Post.create params[:post] +# redirect_to posts_path +# end +# end +# +# Actions, by default, render a template in the app/views directory corresponding to the name of the controller and action +# after executing code in the action. For example, the +index+ action of the PostsController would render the +# template app/views/posts/index.html.erb by default after populating the @posts instance variable. +# +# Unlike index, the create action will not render a template. After performing its main purpose (creating a +# new post), it initiates a redirect instead. This redirect works by returning an external +# 302 Moved HTTP response that takes the user to the index action. +# +# These two methods represent the two basic action archetypes used in Action Controllers: Get-and-show and do-and-redirect. +# Most actions are variations on these themes. +# +# == Requests +# +# For every request, the router determines the value of the +controller+ and +action+ keys. These determine which controller +# and action are called. The remaining request parameters, the session (if one is available), and the full request with +# all the HTTP headers are made available to the action through accessor methods. Then the action is performed. +# +# The full request object is available via the request accessor and is primarily used to query for HTTP headers: +# +# def server_ip +# location = request.env["REMOTE_ADDR"] +# render plain: "This server hosted at #{location}" +# end +# +# == Parameters +# +# All request parameters, whether they come from a query string in the URL or form data submitted through a POST request are +# available through the params method which returns a hash. For example, an action that was performed through +# /posts?category=All&limit=5 will include { "category" => "All", "limit" => "5" } in params. +# +# It's also possible to construct multi-dimensional parameter hashes by specifying keys using brackets, such as: +# +# +# +# +# A request coming from a form holding these inputs will include { "post" => { "name" => "david", "address" => "hyacintvej" } }. +# If the address input had been named post[address][street], the params would have included +# { "post" => { "address" => { "street" => "hyacintvej" } } }. There's no limit to the depth of the nesting. +# +# == Sessions +# +# Sessions allow you to store objects in between requests. This is useful for objects that are not yet ready to be persisted, +# such as a Signup object constructed in a multi-paged process, or objects that don't change much and are needed all the time, such +# as a User object for a system that requires login. The session should not be used, however, as a cache for objects where it's likely +# they could be changed unknowingly. It's usually too much work to keep it all synchronized -- something databases already excel at. +# +# You can place objects in the session by using the session method, which accesses a hash: +# +# session[:person] = Person.authenticate(user_name, password) +# +# You can retrieve it again through the same hash: +# +# "Hello #{session[:person]}" +# +# For removing objects from the session, you can either assign a single key to +nil+: +# +# # removes :person from session +# session[:person] = nil +# +# or you can remove the entire session with +reset_session+. +# +# By default, sessions are stored in an encrypted browser cookie (see +# ActionDispatch::Session::CookieStore). Thus the user will not be able to +# read or edit the session data. However, the user can keep a copy of the +# cookie even after it has expired, so you should avoid storing sensitive +# information in cookie-based sessions. +# +# == Responses +# +# Each action results in a response, which holds the headers and document to be sent to the user's browser. The actual response +# object is generated automatically through the use of renders and redirects and requires no user intervention. +# +# == Renders +# +# Action Controller sends content to the user by using one of five rendering methods. The most versatile and common is the rendering +# of a template. Included in the Action Pack is the Action View, which enables rendering of ERB templates. It's automatically configured. +# The controller passes objects to the view by assigning instance variables: +# +# def show +# @post = Post.find(params[:id]) +# end +# +# Which are then automatically available to the view: +# +# Title: <%= @post.title %> +# +# You don't have to rely on the automated rendering. For example, actions that could result in the rendering of different templates +# will use the manual rendering methods: +# +# def search +# @results = Search.find(params[:query]) +# case @results.count +# when 0 then render action: "no_results" +# when 1 then render action: "show" +# when 2..10 then render action: "show_many" +# end +# end +# +# Read more about writing ERB and Builder templates in ActionView::Base. +# +# == Redirects +# +# Redirects are used to move from one action to another. For example, after a create action, which stores a blog entry to the +# database, we might like to show the user the new entry. Because we're following good DRY principles (Don't Repeat Yourself), we're +# going to reuse (and redirect to) a show action that we'll assume has already been created. The code might look like this: +# +# def create +# @entry = Entry.new(params[:entry]) +# if @entry.save +# # The entry was saved correctly, redirect to show +# redirect_to action: 'show', id: @entry.id +# else +# # things didn't go so well, do something else +# end +# end +# +# In this case, after saving our new entry to the database, the user is redirected to the show method, which is then executed. +# Note that this is an external HTTP-level redirection which will cause the browser to make a second request (a GET to the show action), +# and not some internal re-routing which calls both "create" and then "show" within one request. +# +# Learn more about redirect_to and what options you have in ActionController::Redirecting. +# +# == Calling multiple redirects or renders +# +# An action may contain only a single render or a single redirect. Attempting to try to do either again will result in a DoubleRenderError: +# +# def do_something +# redirect_to action: "elsewhere" +# render action: "overthere" # raises DoubleRenderError +# end +# +# If you need to redirect on the condition of something, then be sure to add "and return" to halt execution. +# +# def do_something +# redirect_to(action: "elsewhere") and return if monkeys.nil? +# render action: "overthere" # won't be called if monkeys is nil +# end +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://actionpack//lib/action_controller/base.rb#167 +class ActionController::Base < ::ActionController::Metal + include ::ActionView::ViewPaths + include ::AbstractController::Rendering + include ::AbstractController::Translation + include ::AbstractController::AssetPaths + include ::AbstractController::Helpers + include ::ActionController::Helpers + include ::ActionDispatch::Routing::PolymorphicRoutes + include ::ActionDispatch::Routing::UrlFor + include ::AbstractController::UrlFor + include ::ActionController::UrlFor + include ::AbstractController::Logger + include ::ActiveSupport::Benchmarkable + include ::ActionController::Redirecting + include ::ActionView::Rendering + include ::ActionView::Layouts + include ::ActionController::Rendering + include ::ActionController::Renderers + include ::ActionController::Renderers::All + include ::ActionController::Head + include ::ActionController::ConditionalGet + include ::ActionController::EtagWithTemplateDigest + include ::ActionController::EtagWithFlash + include ::ActionController::Caching + include ::AbstractController::Caching::Fragments + include ::AbstractController::Caching::ConfigMethods + include ::AbstractController::Caching + include ::ActionController::MimeResponds + include ::ActionController::BasicImplicitRender + include ::ActionController::ImplicitRender + include ::ActionController::StrongParameters + include ::ActionController::ParameterEncoding + include ::ActionController::Cookies + include ::ActionController::Flash + include ::ActionController::FormBuilder + include ::ActiveSupport::Callbacks + include ::AbstractController::Callbacks + include ::ActionController::RequestForgeryProtection + include ::ActionController::ContentSecurityPolicy + include ::ActionController::PermissionsPolicy + include ::ActionController::Streaming + include ::ActionController::DataStreaming + include ::ActionController::HttpAuthentication::Basic::ControllerMethods + include ::ActionController::HttpAuthentication::Digest::ControllerMethods + include ::ActionController::HttpAuthentication::Token::ControllerMethods + include ::ActionController::DefaultHeaders + include ::ActionController::Logging + include ::ActiveSupport::Rescuable + include ::ActionController::Rescue + include ::ActionController::Instrumentation + include ::ActionController::ParamsWrapper + extend ::ActionView::ViewPaths::ClassMethods + extend ::AbstractController::Helpers::ClassMethods + extend ::ActionController::Helpers::ClassMethods + extend ::AbstractController::UrlFor::ClassMethods + extend ::ActionView::Rendering::ClassMethods + extend ::ActionView::Layouts::ClassMethods + extend ::ActionController::Rendering::ClassMethods + extend ::ActionController::Renderers::ClassMethods + extend ::ActionController::ConditionalGet::ClassMethods + extend ::AbstractController::Caching::Fragments::ClassMethods + extend ::AbstractController::Caching::ClassMethods + extend ::AbstractController::Caching::ConfigMethods + extend ::ActionController::ParameterEncoding::ClassMethods + extend ::ActionController::Flash::ClassMethods + extend ::ActionController::FormBuilder::ClassMethods + extend ::ActiveSupport::Callbacks::ClassMethods + extend ::AbstractController::Callbacks::ClassMethods + extend ::ActionController::RequestForgeryProtection::ClassMethods + extend ::ActionController::ContentSecurityPolicy::ClassMethods + extend ::ActionController::PermissionsPolicy::ClassMethods + extend ::ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMethods + extend ::ActionController::DefaultHeaders::ClassMethods + extend ::ActionController::Logging::ClassMethods + extend ::ActiveSupport::Rescuable::ClassMethods + extend ::ActionController::Instrumentation::ClassMethods + extend ::ActionController::ParamsWrapper::ClassMethods + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks?; end + + # source://actionpack//lib/abstract_controller/helpers.rb#11 + def _helper_methods; end + + # source://actionpack//lib/abstract_controller/helpers.rb#11 + def _helper_methods=(_arg0); end + + # source://actionpack//lib/abstract_controller/helpers.rb#11 + def _helper_methods?; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#940 + def _process_action_callbacks; end + + # source://actionpack//lib/action_controller/metal/renderers.rb#31 + def _renderers; end + + # source://actionpack//lib/action_controller/metal/renderers.rb#31 + def _renderers=(_arg0); end + + # source://actionpack//lib/action_controller/metal/renderers.rb#31 + def _renderers?; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#928 + def _run_process_action_callbacks(&block); end + + # source://actionpack//lib/abstract_controller/caching.rb#42 + def _view_cache_dependencies; end + + # source://actionpack//lib/abstract_controller/caching.rb#42 + def _view_cache_dependencies=(_arg0); end + + # source://actionpack//lib/abstract_controller/caching.rb#42 + def _view_cache_dependencies?; end + + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options; end + + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options=(_arg0); end + + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options?; end + + # source://actionpack//lib/action_controller/metal/flash.rb#36 + def alert; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def allow_forgery_protection; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def allow_forgery_protection=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def asset_host; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def asset_host=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def assets_dir; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def assets_dir=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def default_asset_host_protocol; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def default_asset_host_protocol=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def default_protect_from_forgery; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def default_protect_from_forgery=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def default_static_extension; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def default_static_extension=(value); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options=(_arg0); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options?; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def enable_fragment_cache_logging; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def enable_fragment_cache_logging=(value); end + + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 + def etag_with_template_digest; end + + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 + def etag_with_template_digest=(_arg0); end + + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 + def etag_with_template_digest?; end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 + def etaggers; end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 + def etaggers=(_arg0); end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 + def etaggers?; end + + # source://actionpack//lib/action_controller/metal/flash.rb#10 + def flash(*_arg0, **_arg1, &_arg2); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def forgery_protection_origin_check; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def forgery_protection_origin_check=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def forgery_protection_strategy; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def forgery_protection_strategy=(value); end + + # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 + def fragment_cache_keys; end + + # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 + def fragment_cache_keys=(_arg0); end + + # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 + def fragment_cache_keys?; end + + # source://actionpack//lib/action_controller/metal/helpers.rb#63 + def helpers_path; end + + # source://actionpack//lib/action_controller/metal/helpers.rb#63 + def helpers_path=(_arg0); end + + # source://actionpack//lib/action_controller/metal/helpers.rb#63 + def helpers_path?; end + + # source://actionpack//lib/action_controller/metal/helpers.rb#64 + def include_all_helpers; end + + # source://actionpack//lib/action_controller/metal/helpers.rb#64 + def include_all_helpers=(_arg0); end + + # source://actionpack//lib/action_controller/metal/helpers.rb#64 + def include_all_helpers?; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def javascripts_dir; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def javascripts_dir=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def log_warning_on_csrf_failure; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def log_warning_on_csrf_failure=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def logger; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def logger=(value); end + + # source://actionpack//lib/action_controller/metal/flash.rb#36 + def notice; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def per_form_csrf_tokens; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def per_form_csrf_tokens=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def perform_caching; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def perform_caching=(value); end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#13 + def raise_on_open_redirects; end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#13 + def raise_on_open_redirects=(val); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def relative_url_root; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def relative_url_root=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def request_forgery_protection_token; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def request_forgery_protection_token=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/rescuable.rb#13 + def rescue_handlers; end + + # source://activesupport/7.0.4.3/lib/active_support/rescuable.rb#13 + def rescue_handlers=(_arg0); end + + # source://activesupport/7.0.4.3/lib/active_support/rescuable.rb#13 + def rescue_handlers?; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def stylesheets_dir; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def stylesheets_dir=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def urlsafe_csrf_tokens; end + + private + + # source://actionview/7.0.4.3/lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + # source://actionpack//lib/action_controller/base.rb#266 + def _protected_ivars; end + + class << self + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks?; end + + # source://actionpack//lib/action_controller/form_builder.rb#31 + def _default_form_builder; end + + # source://actionpack//lib/action_controller/form_builder.rb#31 + def _default_form_builder=(value); end + + # source://actionpack//lib/action_controller/form_builder.rb#31 + def _default_form_builder?; end + + # source://actionpack//lib/action_controller/metal/flash.rb#8 + def _flash_types; end + + # source://actionpack//lib/action_controller/metal/flash.rb#8 + def _flash_types=(value); end + + # source://actionpack//lib/action_controller/metal/flash.rb#8 + def _flash_types?; end + + # source://actionpack//lib/abstract_controller/helpers.rb#11 + def _helper_methods; end + + # source://actionpack//lib/abstract_controller/helpers.rb#11 + def _helper_methods=(value); end + + # source://actionpack//lib/abstract_controller/helpers.rb#11 + def _helper_methods?; end + + # source://actionpack//lib/abstract_controller/helpers.rb#15 + def _helpers; end + + # source://actionview/7.0.4.3/lib/action_view/layouts.rb#209 + def _layout; end + + # source://actionview/7.0.4.3/lib/action_view/layouts.rb#209 + def _layout=(value); end + + # source://actionview/7.0.4.3/lib/action_view/layouts.rb#209 + def _layout?; end + + # source://actionview/7.0.4.3/lib/action_view/layouts.rb#210 + def _layout_conditions; end + + # source://actionview/7.0.4.3/lib/action_view/layouts.rb#210 + def _layout_conditions=(value); end + + # source://actionview/7.0.4.3/lib/action_view/layouts.rb#210 + def _layout_conditions?; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#932 + def _process_action_callbacks; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#936 + def _process_action_callbacks=(value); end + + # source://actionpack//lib/action_controller/metal/renderers.rb#31 + def _renderers; end + + # source://actionpack//lib/action_controller/metal/renderers.rb#31 + def _renderers=(value); end + + # source://actionpack//lib/action_controller/metal/renderers.rb#31 + def _renderers?; end + + # source://actionpack//lib/abstract_controller/caching.rb#42 + def _view_cache_dependencies; end + + # source://actionpack//lib/abstract_controller/caching.rb#42 + def _view_cache_dependencies=(value); end + + # source://actionpack//lib/abstract_controller/caching.rb#42 + def _view_cache_dependencies?; end + + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options; end + + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options=(value); end + + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options?; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def allow_forgery_protection; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def allow_forgery_protection=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def asset_host; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def asset_host=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def assets_dir; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def assets_dir=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def default_asset_host_protocol; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def default_asset_host_protocol=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def default_protect_from_forgery; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def default_protect_from_forgery=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def default_static_extension; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def default_static_extension=(value); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options=(value); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options?; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def enable_fragment_cache_logging; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def enable_fragment_cache_logging=(value); end + + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 + def etag_with_template_digest; end + + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 + def etag_with_template_digest=(value); end + + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#27 + def etag_with_template_digest?; end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 + def etaggers; end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 + def etaggers=(value); end + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 + def etaggers?; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def forgery_protection_origin_check; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def forgery_protection_origin_check=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def forgery_protection_strategy; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def forgery_protection_strategy=(value); end + + # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 + def fragment_cache_keys; end + + # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 + def fragment_cache_keys=(value); end + + # source://actionpack//lib/abstract_controller/caching/fragments.rb#23 + def fragment_cache_keys?; end + + # source://actionpack//lib/action_controller/metal/helpers.rb#63 + def helpers_path; end + + # source://actionpack//lib/action_controller/metal/helpers.rb#63 + def helpers_path=(value); end + + # source://actionpack//lib/action_controller/metal/helpers.rb#63 + def helpers_path?; end + + # source://actionpack//lib/action_controller/metal/helpers.rb#64 + def include_all_helpers; end + + # source://actionpack//lib/action_controller/metal/helpers.rb#64 + def include_all_helpers=(value); end + + # source://actionpack//lib/action_controller/metal/helpers.rb#64 + def include_all_helpers?; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def javascripts_dir; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def javascripts_dir=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def log_warning_on_csrf_failure; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def log_warning_on_csrf_failure=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def logger; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def logger=(value); end + + # source://actionpack//lib/action_controller/metal.rb#210 + def middleware_stack; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def per_form_csrf_tokens; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def per_form_csrf_tokens=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def perform_caching; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def perform_caching=(value); end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#13 + def raise_on_open_redirects; end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#13 + def raise_on_open_redirects=(val); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def relative_url_root; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def relative_url_root=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def request_forgery_protection_token; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def request_forgery_protection_token=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/rescuable.rb#13 + def rescue_handlers; end + + # source://activesupport/7.0.4.3/lib/active_support/rescuable.rb#13 + def rescue_handlers=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/rescuable.rb#13 + def rescue_handlers?; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def stylesheets_dir; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def stylesheets_dir=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def urlsafe_csrf_tokens; end + + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#97 + def urlsafe_csrf_tokens=(urlsafe_csrf_tokens); end + + # Shortcut helper that returns all the modules included in + # ActionController::Base except the ones passed as arguments: + # + # class MyBaseController < ActionController::Metal + # ActionController::Base.without_modules(:ParamsWrapper, :Streaming).each do |left| + # include left + # end + # end + # + # This gives better control over what you want to exclude and makes it + # easier to create a bare controller class, instead of listing the modules + # required manually. + # + # source://actionpack//lib/action_controller/base.rb#198 + def without_modules(*modules); end + end +end + +# source://actionpack//lib/action_controller/base.rb#0 +module ActionController::Base::HelperMethods + # source://actionpack//lib/action_controller/metal/flash.rb#39 + def alert(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/caching/fragments.rb#31 + def combined_fragment_cache_key(*args, **_arg1, &block); end + + # source://actionpack//lib/action_controller/metal/content_security_policy.rb#11 + def content_security_policy?(*args, **_arg1, &block); end + + # source://actionpack//lib/action_controller/metal/content_security_policy.rb#12 + def content_security_policy_nonce(*args, **_arg1, &block); end + + # source://actionpack//lib/action_controller/metal/cookies.rb#8 + def cookies(*args, **_arg1, &block); end + + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#106 + def form_authenticity_token(*args, **_arg1, &block); end + + # source://actionpack//lib/action_controller/metal/flash.rb#39 + def notice(*args, **_arg1, &block); end + + # source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#107 + def protect_against_forgery?(*args, **_arg1, &block); end + + # source://actionpack//lib/abstract_controller/caching.rb#43 + def view_cache_dependencies(*args, **_arg1, &block); end +end + +# source://actionpack//lib/action_controller/base.rb#206 +ActionController::Base::MODULES = T.let(T.unsafe(nil), Array) + +# Define some internal variables that should not be propagated to the view. +# +# source://actionpack//lib/action_controller/base.rb#261 +ActionController::Base::PROTECTED_IVARS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_controller/metal/basic_implicit_render.rb#4 +module ActionController::BasicImplicitRender + # source://actionpack//lib/action_controller/metal/basic_implicit_render.rb#9 + def default_render; end + + # source://actionpack//lib/action_controller/metal/basic_implicit_render.rb#5 + def send_action(method, *args); end +end + +# \Caching is a cheap way of speeding up slow applications by keeping the result of +# calculations, renderings, and database calls around for subsequent requests. +# +# You can read more about each approach by clicking the modules below. +# +# Note: To turn off all caching provided by Action Controller, set +# config.action_controller.perform_caching = false +# +# == \Caching stores +# +# All the caching stores from ActiveSupport::Cache are available to be used as backends +# for Action Controller caching. +# +# Configuration examples (FileStore is the default): +# +# config.action_controller.cache_store = :memory_store +# config.action_controller.cache_store = :file_store, '/path/to/cache/directory' +# config.action_controller.cache_store = :mem_cache_store, 'localhost' +# config.action_controller.cache_store = :mem_cache_store, Memcached::Rails.new('localhost:11211') +# config.action_controller.cache_store = MyOwnStore.new('parameter') +# +# source://actionpack//lib/action_controller/caching.rb#24 +module ActionController::Caching + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::AbstractController::Caching::Fragments + include ::AbstractController::Caching + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::Caching::Fragments::ClassMethods + mixes_in_class_methods ::AbstractController::Caching::ClassMethods + mixes_in_class_methods ::AbstractController::Caching::ConfigMethods + + private + + # source://actionpack//lib/action_controller/caching.rb#40 + def instrument_name; end + + # source://actionpack//lib/action_controller/caching.rb#32 + def instrument_payload(key); end + + module GeneratedClassMethods + def _view_cache_dependencies; end + def _view_cache_dependencies=(value); end + def _view_cache_dependencies?; end + def fragment_cache_keys; end + def fragment_cache_keys=(value); end + def fragment_cache_keys?; end + end + + module GeneratedInstanceMethods + def _view_cache_dependencies; end + def _view_cache_dependencies=(value); end + def _view_cache_dependencies?; end + def fragment_cache_keys; end + def fragment_cache_keys=(value); end + def fragment_cache_keys?; end + end +end + +# source://actionpack//lib/action_controller/metal/conditional_get.rb#7 +module ActionController::ConditionalGet + include ::ActionController::Head + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionController::ConditionalGet::ClassMethods + + # Sets an HTTP 1.1 Cache-Control header. Defaults to issuing a +private+ + # instruction, so that intermediate caches must not cache the response. + # + # expires_in 20.minutes + # expires_in 3.hours, public: true + # expires_in 3.hours, public: true, must_revalidate: true + # + # This method will overwrite an existing Cache-Control header. + # See https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html for more possibilities. + # + # HTTP Cache-Control Extensions for Stale Content. See https://tools.ietf.org/html/rfc5861 + # It helps to cache an asset and serve it while is being revalidated and/or returning with an error. + # + # expires_in 3.hours, public: true, stale_while_revalidate: 60.seconds + # expires_in 3.hours, public: true, stale_while_revalidate: 60.seconds, stale_if_error: 5.minutes + # + # HTTP Cache-Control Extensions other values: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control + # Any additional key-value pairs are concatenated onto the Cache-Control header in the response: + # + # expires_in 3.hours, public: true, "s-maxage": 3.hours, "no-transform": true + # + # The method will also ensure an HTTP Date header for client compatibility. + # + # source://actionpack//lib/action_controller/metal/conditional_get.rb#276 + def expires_in(seconds, options = T.unsafe(nil)); end + + # Sets an HTTP 1.1 Cache-Control header of no-cache. This means the + # resource will be marked as stale, so clients must always revalidate. + # Intermediate/browser caches may still store the asset. + # + # source://actionpack//lib/action_controller/metal/conditional_get.rb#294 + def expires_now; end + + # Sets the +etag+, +last_modified+, or both on the response and renders a + # 304 Not Modified response if the request is already fresh. + # + # === Parameters: + # + # * :etag Sets a "weak" ETag validator on the response. See the + # +:weak_etag+ option. + # * :weak_etag Sets a "weak" ETag validator on the response. + # Requests that set If-None-Match header may return a 304 Not Modified + # response if it matches the ETag exactly. A weak ETag indicates semantic + # equivalence, not byte-for-byte equality, so they're good for caching + # HTML pages in browser caches. They can't be used for responses that + # must be byte-identical, like serving Range requests within a PDF file. + # * :strong_etag Sets a "strong" ETag validator on the response. + # Requests that set If-None-Match header may return a 304 Not Modified + # response if it matches the ETag exactly. A strong ETag implies exact + # equality: the response must match byte for byte. This is necessary for + # doing Range requests within a large video or PDF file, for example, or + # for compatibility with some CDNs that don't support weak ETags. + # * :last_modified Sets a "weak" last-update validator on the + # response. Subsequent requests that set If-Modified-Since may return a + # 304 Not Modified response if last_modified <= If-Modified-Since. + # * :public By default the Cache-Control header is private, set this to + # +true+ if you want your application to be cacheable by other devices (proxy caches). + # * :cache_control When given will overwrite an existing Cache-Control header. + # See https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html for more possibilities. + # * :template By default, the template digest for the current + # controller/action is included in ETags. If the action renders a + # different template, you can include its digest instead. If the action + # doesn't render a template at all, you can pass template: false + # to skip any attempt to check for a template digest. + # + # === Example: + # + # def show + # @article = Article.find(params[:id]) + # fresh_when(etag: @article, last_modified: @article.updated_at, public: true) + # end + # + # This will render the show template if the request isn't sending a matching ETag or + # If-Modified-Since header and just a 304 Not Modified response if there's a match. + # + # You can also just pass a record. In this case +last_modified+ will be set + # by calling +updated_at+ and +etag+ by passing the object itself. + # + # def show + # @article = Article.find(params[:id]) + # fresh_when(@article) + # end + # + # You can also pass an object that responds to +maximum+, such as a + # collection of active records. In this case +last_modified+ will be set by + # calling maximum(:updated_at) on the collection (the timestamp of the + # most recently updated record) and the +etag+ by passing the object itself. + # + # def index + # @articles = Article.all + # fresh_when(@articles) + # end + # + # When passing a record or a collection, you can still set the public header: + # + # def show + # @article = Article.find(params[:id]) + # fresh_when(@article, public: true) + # end + # + # When overwriting Cache-Control header: + # + # def show + # @article = Article.find(params[:id]) + # fresh_when(@article, public: true, cache_control: { no_cache: true }) + # end + # + # This will set in the response Cache-Control = public, no-cache. + # + # When rendering a different template than the default controller/action + # style, you can indicate which digest to include in the ETag: + # + # before_action { fresh_when @article, template: 'widgets/show' } + # + # source://actionpack//lib/action_controller/metal/conditional_get.rb#117 + def fresh_when(object = T.unsafe(nil), etag: T.unsafe(nil), weak_etag: T.unsafe(nil), strong_etag: T.unsafe(nil), last_modified: T.unsafe(nil), public: T.unsafe(nil), cache_control: T.unsafe(nil), template: T.unsafe(nil)); end + + # Cache or yield the block. The cache is supposed to never expire. + # + # You can use this method when you have an HTTP response that never changes, + # and the browser and proxies should cache it indefinitely. + # + # * +public+: By default, HTTP responses are private, cached only on the + # user's web browser. To allow proxies to cache the response, set +true+ to + # indicate that they can serve the cached response to all users. + # + # source://actionpack//lib/action_controller/metal/conditional_get.rb#306 + def http_cache_forever(public: T.unsafe(nil)); end + + # Sets an HTTP 1.1 Cache-Control header of no-store. This means the + # resource may not be stored in any cache. + # + # source://actionpack//lib/action_controller/metal/conditional_get.rb#316 + def no_store; end + + # Sets the +etag+ and/or +last_modified+ on the response and checks it against + # the client request. If the request doesn't match the options provided, the + # request is considered stale and should be generated from scratch. Otherwise, + # it's fresh and we don't need to generate anything and a reply of 304 Not Modified is sent. + # + # === Parameters: + # + # * :etag Sets a "weak" ETag validator on the response. See the + # +:weak_etag+ option. + # * :weak_etag Sets a "weak" ETag validator on the response. + # Requests that set If-None-Match header may return a 304 Not Modified + # response if it matches the ETag exactly. A weak ETag indicates semantic + # equivalence, not byte-for-byte equality, so they're good for caching + # HTML pages in browser caches. They can't be used for responses that + # must be byte-identical, like serving Range requests within a PDF file. + # * :strong_etag Sets a "strong" ETag validator on the response. + # Requests that set If-None-Match header may return a 304 Not Modified + # response if it matches the ETag exactly. A strong ETag implies exact + # equality: the response must match byte for byte. This is necessary for + # doing Range requests within a large video or PDF file, for example, or + # for compatibility with some CDNs that don't support weak ETags. + # * :last_modified Sets a "weak" last-update validator on the + # response. Subsequent requests that set If-Modified-Since may return a + # 304 Not Modified response if last_modified <= If-Modified-Since. + # * :public By default the Cache-Control header is private, set this to + # +true+ if you want your application to be cacheable by other devices (proxy caches). + # * :cache_control When given will overwrite an existing Cache-Control header. + # See https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html for more possibilities. + # * :template By default, the template digest for the current + # controller/action is included in ETags. If the action renders a + # different template, you can include its digest instead. If the action + # doesn't render a template at all, you can pass template: false + # to skip any attempt to check for a template digest. + # + # === Example: + # + # def show + # @article = Article.find(params[:id]) + # + # if stale?(etag: @article, last_modified: @article.updated_at) + # @statistics = @article.really_expensive_call + # respond_to do |format| + # # all the supported formats + # end + # end + # end + # + # You can also just pass a record. In this case +last_modified+ will be set + # by calling +updated_at+ and +etag+ by passing the object itself. + # + # def show + # @article = Article.find(params[:id]) + # + # if stale?(@article) + # @statistics = @article.really_expensive_call + # respond_to do |format| + # # all the supported formats + # end + # end + # end + # + # You can also pass an object that responds to +maximum+, such as a + # collection of active records. In this case +last_modified+ will be set by + # calling maximum(:updated_at) on the collection (the timestamp of the + # most recently updated record) and the +etag+ by passing the object itself. + # + # def index + # @articles = Article.all + # + # if stale?(@articles) + # @statistics = @articles.really_expensive_call + # respond_to do |format| + # # all the supported formats + # end + # end + # end + # + # When passing a record or a collection, you can still set the public header: + # + # def show + # @article = Article.find(params[:id]) + # + # if stale?(@article, public: true) + # @statistics = @article.really_expensive_call + # respond_to do |format| + # # all the supported formats + # end + # end + # end + # + # When overwriting Cache-Control header: + # + # def show + # @article = Article.find(params[:id]) + # + # if stale?(@article, public: true, cache_control: { no_cache: true }) + # @statistics = @articles.really_expensive_call + # respond_to do |format| + # # all the supported formats + # end + # end + # end + # + # This will set in the response Cache-Control = public, no-cache. + # + # When rendering a different template than the default controller/action + # style, you can indicate which digest to include in the ETag: + # + # def show + # super if stale? @article, template: 'widgets/show' + # end + # + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/conditional_get.rb#249 + def stale?(object = T.unsafe(nil), **freshness_kwargs); end + + private + + # source://actionpack//lib/action_controller/metal/conditional_get.rb#321 + def combine_etags(validator, options); end + + module GeneratedClassMethods + def etaggers; end + def etaggers=(value); end + def etaggers?; end + end + + module GeneratedInstanceMethods + def etaggers; end + def etaggers=(value); end + def etaggers?; end + end +end + +# source://actionpack//lib/action_controller/metal/conditional_get.rb#16 +module ActionController::ConditionalGet::ClassMethods + # Allows you to consider additional controller-wide information when generating an ETag. + # For example, if you serve pages tailored depending on who's logged in at the moment, you + # may want to add the current user id to be part of the ETag to prevent unauthorized displaying + # of cached pages. + # + # class InvoicesController < ApplicationController + # etag { current_user&.id } + # + # def show + # # Etag will differ even for the same invoice when it's viewed by a different current_user + # @invoice = Invoice.find(params[:id]) + # fresh_when etag: @invoice + # end + # end + # + # source://actionpack//lib/action_controller/metal/conditional_get.rb#31 + def etag(&etagger); end +end + +# source://actionpack//lib/action_controller/metal/content_security_policy.rb#4 +module ActionController::ContentSecurityPolicy + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::AbstractController::Helpers + include ::ActiveSupport::Callbacks + include ::AbstractController::Callbacks + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::Helpers::ClassMethods + mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods + mixes_in_class_methods ::ActiveSupport::DescendantsTracker + mixes_in_class_methods ::AbstractController::Callbacks::ClassMethods + mixes_in_class_methods ::ActionController::ContentSecurityPolicy::ClassMethods + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/content_security_policy.rb#73 + def content_security_policy?; end + + # source://actionpack//lib/action_controller/metal/content_security_policy.rb#77 + def content_security_policy_nonce; end + + # source://actionpack//lib/action_controller/metal/content_security_policy.rb#81 + def current_content_security_policy; end + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + def __callbacks?; end + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + end + + module GeneratedInstanceMethods + def __callbacks; end + def __callbacks?; end + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + end +end + +# source://actionpack//lib/action_controller/metal/content_security_policy.rb#15 +module ActionController::ContentSecurityPolicy::ClassMethods + # Overrides parts of the globally configured Content-Security-Policy + # header: + # + # class PostsController < ApplicationController + # content_security_policy do |policy| + # policy.base_uri "https://www.example.com" + # end + # end + # + # Options can be passed similar to +before_action+. For example, pass + # only: :index to override the header on the index action only: + # + # class PostsController < ApplicationController + # content_security_policy(only: :index) do |policy| + # policy.default_src :self, :https + # end + # end + # + # Pass +false+ to remove the Content-Security-Policy header: + # + # class PostsController < ApplicationController + # content_security_policy false, only: :index + # end + # + # source://actionpack//lib/action_controller/metal/content_security_policy.rb#39 + def content_security_policy(enabled = T.unsafe(nil), **options, &block); end + + # Overrides the globally configured Content-Security-Policy-Report-Only + # header: + # + # class PostsController < ApplicationController + # content_security_policy_report_only only: :index + # end + # + # Pass +false+ to remove the Content-Security-Policy-Report-Only header: + # + # class PostsController < ApplicationController + # content_security_policy_report_only false, only: :index + # end + # + # source://actionpack//lib/action_controller/metal/content_security_policy.rb#65 + def content_security_policy_report_only(report_only = T.unsafe(nil), **options); end +end + +# source://actionpack//lib/action_controller/metal/cookies.rb#4 +module ActionController::Cookies + extend ::ActiveSupport::Concern + + private + + # The cookies for the current request. See ActionDispatch::Cookies for + # more information. + # + # source://actionpack//lib/action_controller/metal/cookies.rb#14 + def cookies; end +end + +# Methods for sending arbitrary data and for streaming files to the browser, +# instead of rendering. +# +# source://actionpack//lib/action_controller/metal/data_streaming.rb#9 +module ActionController::DataStreaming + extend ::ActiveSupport::Concern + include ::ActionController::Rendering + + mixes_in_class_methods ::ActionController::Rendering::ClassMethods + + private + + # Sends the given binary data to the browser. This method is similar to + # render plain: data, but also allows you to specify whether + # the browser should display the response as a file attachment (i.e. in a + # download dialog) or as inline data. You may also set the content type, + # the file name, and other things. + # + # Options: + # * :filename - suggests a filename for the browser to use. + # * :type - specifies an HTTP content type. Defaults to 'application/octet-stream'. + # You can specify either a string or a symbol for a registered type with Mime::Type.register, for example :json. + # If omitted, type will be inferred from the file extension specified in :filename. + # If no content type is registered for the extension, the default type 'application/octet-stream' will be used. + # * :disposition - specifies whether the file will be shown inline or downloaded. + # Valid values are 'inline' and 'attachment' (default). + # * :status - specifies the status code to send with the response. Defaults to 200. + # + # Generic data download: + # + # send_data buffer + # + # Download a dynamically-generated tarball: + # + # send_data generate_tgz('dir'), filename: 'dir.tgz' + # + # Display an image Active Record in the browser: + # + # send_data image.data, type: image.content_type, disposition: 'inline' + # + # See +send_file+ for more information on HTTP Content-* headers and caching. + # + # source://actionpack//lib/action_controller/metal/data_streaming.rb#109 + def send_data(data, options = T.unsafe(nil)); end + + # Sends the file. This uses a server-appropriate method (such as X-Sendfile) + # via the Rack::Sendfile middleware. The header to use is set via + # +config.action_dispatch.x_sendfile_header+. + # Your server can also configure this for you by setting the X-Sendfile-Type header. + # + # Be careful to sanitize the path parameter if it is coming from a web + # page. send_file(params[:path]) allows a malicious user to + # download any file on your server. + # + # Options: + # * :filename - suggests a filename for the browser to use. + # Defaults to File.basename(path). + # * :type - specifies an HTTP content type. + # You can specify either a string or a symbol for a registered type with Mime::Type.register, for example :json. + # If omitted, the type will be inferred from the file extension specified in :filename. + # If no content type is registered for the extension, the default type 'application/octet-stream' will be used. + # * :disposition - specifies whether the file will be shown inline or downloaded. + # Valid values are 'inline' and 'attachment' (default). + # * :status - specifies the status code to send with the response. Defaults to 200. + # * :url_based_filename - set to +true+ if you want the browser to guess the filename from + # the URL, which is necessary for i18n filenames on certain browsers + # (setting :filename overrides this option). + # + # The default Content-Type and Content-Disposition headers are + # set to download arbitrary binary files in as many browsers as + # possible. IE versions 4, 5, 5.5, and 6 are all known to have + # a variety of quirks (especially when downloading over SSL). + # + # Simple download: + # + # send_file '/path/to.zip' + # + # Show a JPEG in the browser: + # + # send_file '/path/to.jpeg', type: 'image/jpeg', disposition: 'inline' + # + # Show a 404 page in the browser: + # + # send_file '/path/to/404.html', type: 'text/html; charset=utf-8', disposition: 'inline', status: 404 + # + # Read about the other Content-* HTTP headers if you'd like to + # provide the user with more information (such as Content-Description) in + # https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11. + # + # Also be aware that the document may be cached by proxies and browsers. + # The Pragma and Cache-Control headers declare how the file may be cached + # by intermediaries. They default to require clients to validate with + # the server before releasing cached responses. See + # https://www.mnot.net/cache_docs/ for an overview of web caching and + # https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 + # for the Cache-Control header spec. + # + # @raise [MissingFile] + # + # source://actionpack//lib/action_controller/metal/data_streaming.rb#69 + def send_file(path, options = T.unsafe(nil)); end + + # @raise [ArgumentError] + # + # source://actionpack//lib/action_controller/metal/data_streaming.rb#114 + def send_file_headers!(options); end +end + +# source://actionpack//lib/action_controller/metal/data_streaming.rb#15 +ActionController::DataStreaming::DEFAULT_SEND_FILE_DISPOSITION = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_controller/metal/data_streaming.rb#14 +ActionController::DataStreaming::DEFAULT_SEND_FILE_TYPE = T.let(T.unsafe(nil), String) + +# Allows configuring default headers that will be automatically merged into +# each response. +# +# source://actionpack//lib/action_controller/metal/default_headers.rb#6 +module ActionController::DefaultHeaders + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::DefaultHeaders::ClassMethods +end + +# source://actionpack//lib/action_controller/metal/default_headers.rb#9 +module ActionController::DefaultHeaders::ClassMethods + # source://actionpack//lib/action_controller/metal/default_headers.rb#10 + def make_response!(request); end +end + +# When you're using the flash, it's generally used as a conditional on the view. +# This means the content of the view depends on the flash. Which in turn means +# that the ETag for a response should be computed with the content of the flash +# in mind. This does that by including the content of the flash as a component +# in the ETag that's generated for a response. +# +# source://actionpack//lib/action_controller/metal/etag_with_flash.rb#9 +module ActionController::EtagWithFlash + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActionController::ConditionalGet + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionController::ConditionalGet::ClassMethods + + module GeneratedClassMethods + def etaggers; end + def etaggers=(value); end + def etaggers?; end + end + + module GeneratedInstanceMethods + def etaggers; end + def etaggers=(value); end + def etaggers?; end + end +end + +# When our views change, they should bubble up into HTTP cache freshness +# and bust browser caches. So the template digest for the current action +# is automatically included in the ETag. +# +# Enabled by default for apps that use Action View. Disable by setting +# +# config.action_controller.etag_with_template_digest = false +# +# Override the template to digest by passing +:template+ to +fresh_when+ +# and +stale?+ calls. For example: +# +# # We're going to render widgets/show, not posts/show +# fresh_when @post, template: 'widgets/show' +# +# # We're not going to render a template, so omit it from the ETag. +# fresh_when @post, template: false +# +# source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#21 +module ActionController::EtagWithTemplateDigest + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActionController::ConditionalGet + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionController::ConditionalGet::ClassMethods + + private + + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#35 + def determine_template_etag(options); end + + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#51 + def lookup_and_digest_template(template); end + + # Pick the template digest to include in the ETag. If the +:template+ option + # is present, use the named template. If +:template+ is +nil+ or absent, use + # the default controller/action template. If +:template+ is false, omit the + # template digest from the ETag. + # + # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#45 + def pick_template_for_etag(options); end + + module GeneratedClassMethods + def etag_with_template_digest; end + def etag_with_template_digest=(value); end + def etag_with_template_digest?; end + def etaggers; end + def etaggers=(value); end + def etaggers?; end + end + + module GeneratedInstanceMethods + def etag_with_template_digest; end + def etag_with_template_digest=(value); end + def etag_with_template_digest?; end + def etaggers; end + def etaggers=(value); end + def etaggers?; end + end +end + +# source://actionpack//lib/action_controller/metal/flash.rb#4 +module ActionController::Flash + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionController::Flash::ClassMethods + + private + + # source://actionpack//lib/action_controller/metal/flash.rb#51 + def redirect_to(options = T.unsafe(nil), response_options_and_flash = T.unsafe(nil)); end + + module GeneratedClassMethods + def _flash_types; end + def _flash_types=(value); end + def _flash_types?; end + end + + module GeneratedInstanceMethods; end +end + +# source://actionpack//lib/action_controller/metal/flash.rb#14 +module ActionController::Flash::ClassMethods + # source://actionpack//lib/action_controller/metal/flash.rb#45 + def action_methods; end + + # Creates new flash types. You can pass as many types as you want to create + # flash types other than the default alert and notice in + # your controllers and views. For instance: + # + # # in application_controller.rb + # class ApplicationController < ActionController::Base + # add_flash_types :warning + # end + # + # # in your controller + # redirect_to user_path(@user), warning: "Incomplete profile" + # + # # in your view + # <%= warning %> + # + # This method will automatically define a new method for each of the given + # names, and it will be available in your views. + # + # source://actionpack//lib/action_controller/metal/flash.rb#32 + def add_flash_types(*types); end +end + +# Override the default form builder for all views rendered by this +# controller and any of its descendants. Accepts a subclass of +# ActionView::Helpers::FormBuilder. +# +# For example, given a form builder: +# +# class AdminFormBuilder < ActionView::Helpers::FormBuilder +# def special_field(name) +# end +# end +# +# The controller specifies a form builder as its default: +# +# class AdminAreaController < ApplicationController +# default_form_builder AdminFormBuilder +# end +# +# Then in the view any form using +form_for+ will be an instance of the +# specified form builder: +# +# <%= form_for(@instance) do |builder| %> +# <%= builder.special_field(:name) %> +# <% end %> +# +# source://actionpack//lib/action_controller/form_builder.rb#27 +module ActionController::FormBuilder + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionController::FormBuilder::ClassMethods + + # Default form builder for the controller + # + # source://actionpack//lib/action_controller/form_builder.rb#46 + def default_form_builder; end + + module GeneratedClassMethods + def _default_form_builder; end + def _default_form_builder=(value); end + def _default_form_builder?; end + end + + module GeneratedInstanceMethods; end +end + +# source://actionpack//lib/action_controller/form_builder.rb#34 +module ActionController::FormBuilder::ClassMethods + # Set the form builder to be used as the default for all forms + # in the views rendered by this controller and its subclasses. + # + # ==== Parameters + # * builder - Default form builder, an instance of ActionView::Helpers::FormBuilder + # + # source://actionpack//lib/action_controller/form_builder.rb#40 + def default_form_builder(builder); end +end + +# source://actionpack//lib/action_controller/metal/head.rb#4 +module ActionController::Head + # Returns a response that has no content (merely headers). The options + # argument is interpreted to be a hash of header names and values. + # This allows you to easily return a response that consists only of + # significant headers: + # + # head :created, location: person_path(@person) + # + # head :created, location: @person + # + # It can also be used to return exceptional conditions: + # + # return head(:method_not_allowed) unless request.post? + # return head(:bad_request) unless valid_request? + # render + # + # See Rack::Utils::SYMBOL_TO_STATUS_CODE for a full list of valid +status+ symbols. + # + # source://actionpack//lib/action_controller/metal/head.rb#21 + def head(status, options = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/head.rb#52 + def include_content?(status); end +end + +# The \Rails framework provides a large number of helpers for working with assets, dates, forms, +# numbers and model objects, to name a few. These helpers are available to all templates +# by default. +# +# In addition to using the standard template helpers provided, creating custom helpers to +# extract complicated logic or reusable functionality is strongly encouraged. By default, each controller +# will include all helpers. These helpers are only accessible on the controller through #helpers +# +# In previous versions of \Rails the controller will include a helper which +# matches the name of the controller, e.g., MyController will automatically +# include MyHelper. You can revert to the old behavior with the following: +# +# # config/application.rb +# class Application < Rails::Application +# config.action_controller.include_all_helpers = false +# end +# +# Additional helpers can be specified using the +helper+ class method in ActionController::Base or any +# controller which inherits from it. +# +# The +to_s+ method from the \Time class can be wrapped in a helper method to display a custom message if +# a \Time object is blank: +# +# module FormattedTimeHelper +# def format_time(time, format=:long, blank_message=" ") +# time.blank? ? blank_message : time.to_fs(format) +# end +# end +# +# FormattedTimeHelper can now be included in a controller, using the +helper+ class method: +# +# class EventsController < ActionController::Base +# helper FormattedTimeHelper +# def index +# @events = Event.all +# end +# end +# +# Then, in any view rendered by EventsController, the format_time method can be called: +# +# <% @events.each do |event| -%> +#

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

+# <% end -%> +# +# Finally, assuming we have two event instances, one which has a time and one which does not, +# the output might look like this: +# +# 23 Aug 11:30 | Carolina Railhawks Soccer Match +# N/A | Carolina Railhawks Training Workshop +# +# source://actionpack//lib/action_controller/metal/helpers.rb#56 +module ActionController::Helpers + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::AbstractController::Helpers + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::Helpers::ClassMethods + mixes_in_class_methods ::ActionController::Helpers::ClassMethods + + # Provides a proxy to access helper methods from outside the view. + # + # source://actionpack//lib/action_controller/metal/helpers.rb#128 + def helpers; end + + class << self + # Returns the value of attribute helpers_path. + # + # source://actionpack//lib/action_controller/metal/helpers.rb#59 + def helpers_path; end + + # Sets the attribute helpers_path + # + # @param value the value to set the attribute helpers_path to. + # + # source://actionpack//lib/action_controller/metal/helpers.rb#59 + def helpers_path=(_arg0); end + end + + module GeneratedClassMethods + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + def helpers_path; end + def helpers_path=(value); end + def helpers_path?; end + def include_all_helpers; end + def include_all_helpers=(value); end + def include_all_helpers?; end + end + + module GeneratedInstanceMethods + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + def helpers_path; end + def helpers_path=(value); end + def helpers_path?; end + def include_all_helpers; end + def include_all_helpers=(value); end + def include_all_helpers?; end + end +end + +# source://actionpack//lib/action_controller/metal/helpers.rb#67 +module ActionController::Helpers::ClassMethods + # Returns a list of helper names in a given path. + # + # ActionController::Base.all_helpers_from_path 'app/helpers' + # # => ["application", "chart", "rubygems"] + # + # source://actionpack//lib/action_controller/metal/helpers.rb#111 + def all_helpers_from_path(path); end + + # Declares helper accessors for controller attributes. For example, the + # following adds new +name+ and name= instance methods to a + # controller and makes them available to the view: + # attr_accessor :name + # helper_attr :name + # + # ==== Parameters + # * attrs - Names of attributes to be converted into helpers. + # + # source://actionpack//lib/action_controller/metal/helpers.rb#76 + def helper_attr(*attrs); end + + # Provides a proxy to access helper methods from outside the view. + # + # Note that the proxy is rendered under a different view context. + # This may cause incorrect behaviour with capture methods. Consider + # using {helper}[rdoc-ref:AbstractController::Helpers::ClassMethods#helper] + # instead when using +capture+. + # + # source://actionpack//lib/action_controller/metal/helpers.rb#86 + def helpers; end + + # Override modules_for_helpers to accept +:all+ as argument, which loads + # all helpers in helpers_path. + # + # ==== Parameters + # * args - A list of helpers + # + # ==== Returns + # * array - A normalized list of modules for the list of helpers provided. + # + # source://actionpack//lib/action_controller/metal/helpers.rb#102 + def modules_for_helpers(args); end + + private + + # Extract helper names from files in app/helpers/**/*_helper.rb + # + # source://actionpack//lib/action_controller/metal/helpers.rb#122 + def all_application_helpers; end +end + +# HTTP Basic, Digest, and Token authentication. +# +# source://actionpack//lib/action_controller/metal/http_authentication.rb#9 +module ActionController::HttpAuthentication; end + +# = HTTP \Basic authentication +# +# === Simple \Basic example +# +# class PostsController < ApplicationController +# http_basic_authenticate_with name: "dhh", password: "secret", except: :index +# +# def index +# render plain: "Everyone can see me!" +# end +# +# def edit +# render plain: "I'm only accessible if you know the password" +# end +# end +# +# === Advanced \Basic example +# +# Here is a more advanced \Basic example where only Atom feeds and the XML API are protected by HTTP authentication. +# The regular HTML interface is protected by a session approach: +# +# class ApplicationController < ActionController::Base +# before_action :set_account, :authenticate +# +# private +# def set_account +# @account = Account.find_by(url_name: request.subdomains.first) +# end +# +# def authenticate +# case request.format +# when Mime[:xml], Mime[:atom] +# if user = authenticate_with_http_basic { |u, p| @account.users.authenticate(u, p) } +# @current_user = user +# else +# request_http_basic_authentication +# end +# else +# if session_authenticated? +# @current_user = @account.users.find(session[:authenticated][:user_id]) +# else +# redirect_to(login_url) and return false +# end +# end +# end +# end +# +# In your integration tests, you can do something like this: +# +# def test_access_granted_from_xml +# authorization = ActionController::HttpAuthentication::Basic.encode_credentials(users(:dhh).name, users(:dhh).password) +# +# get "/notes/1.xml", headers: { 'HTTP_AUTHORIZATION' => authorization } +# +# assert_equal 200, status +# end +# +# source://actionpack//lib/action_controller/metal/http_authentication.rb#66 +module ActionController::HttpAuthentication::Basic + extend ::ActionController::HttpAuthentication::Basic + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#127 + def auth_param(request); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#123 + def auth_scheme(request); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#105 + def authenticate(request, &login_procedure); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#135 + def authentication_request(controller, realm, message); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#119 + def decode_credentials(request); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#131 + def encode_credentials(user_name, password); end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#111 + def has_basic_credentials?(request); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#115 + def user_name_and_password(request); end +end + +# source://actionpack//lib/action_controller/metal/http_authentication.rb#69 +module ActionController::HttpAuthentication::Basic::ControllerMethods + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMethods + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#92 + def authenticate_or_request_with_http_basic(realm = T.unsafe(nil), message = T.unsafe(nil), &login_procedure); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#96 + def authenticate_with_http_basic(&login_procedure); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#83 + def http_basic_authenticate_or_request_with(name:, password:, realm: T.unsafe(nil), message: T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#100 + def request_http_basic_authentication(realm = T.unsafe(nil), message = T.unsafe(nil)); end +end + +# source://actionpack//lib/action_controller/metal/http_authentication.rb#72 +module ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMethods + # Enables HTTP \Basic authentication. + # + # See ActionController::HttpAuthentication::Basic for example usage. + # + # @raise [ArgumentError] + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#76 + def http_basic_authenticate_with(name:, password:, realm: T.unsafe(nil), **options); end +end + +# = HTTP \Digest authentication +# +# === Simple \Digest example +# +# require "openssl" +# class PostsController < ApplicationController +# REALM = "SuperSecret" +# USERS = {"dhh" => "secret", #plain text password +# "dap" => OpenSSL::Digest::MD5.hexdigest(["dap",REALM,"secret"].join(":"))} #ha1 digest password +# +# before_action :authenticate, except: [:index] +# +# def index +# render plain: "Everyone can see me!" +# end +# +# def edit +# render plain: "I'm only accessible if you know the password" +# end +# +# private +# def authenticate +# authenticate_or_request_with_http_digest(REALM) do |username| +# USERS[username] +# end +# end +# end +# +# === Notes +# +# The +authenticate_or_request_with_http_digest+ block must return the user's password +# or the ha1 digest hash so the framework can appropriately hash to check the user's +# credentials. Returning +nil+ will cause authentication to fail. +# +# Storing the ha1 hash: MD5(username:realm:password), is better than storing a plain password. If +# the password file or database is compromised, the attacker would be able to use the ha1 hash to +# authenticate as the user at this +realm+, but would not have the user's password to try using at +# other sites. +# +# In rare instances, web servers or front proxies strip authorization headers before +# they reach your application. You can debug this situation by logging all environment +# variables, and check for HTTP_AUTHORIZATION, amongst others. +# +# source://actionpack//lib/action_controller/metal/http_authentication.rb#185 +module ActionController::HttpAuthentication::Digest + extend ::ActionController::HttpAuthentication::Digest + + # Returns false on a valid response, true otherwise. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#211 + def authenticate(request, realm, &password_procedure); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#269 + def authentication_header(controller, realm); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#276 + def authentication_request(controller, realm, message = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#262 + def decode_credentials(header); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#258 + def decode_credentials_header(request); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#253 + def encode_credentials(http_method, credentials, password, password_is_ha1); end + + # Returns the expected response for a request of +http_method+ to +uri+ with the decoded +credentials+ and the expected +password+ + # Optional parameter +password_is_ha1+ is set to +true+ by default, since best practice is to store ha1 digest instead + # of a plain-text password. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#243 + def expected_response(http_method, uri, credentials, password, password_is_ha1 = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#249 + def ha1(credentials, password); end + + # Uses an MD5 digest based on time to generate a value to be used only once. + # + # A server-specified data string which should be uniquely generated each time a 401 response is made. + # It is recommended that this string be base64 or hexadecimal data. + # Specifically, since the string is passed in the header lines as a quoted string, the double-quote character is not allowed. + # + # The contents of the nonce are implementation dependent. + # The quality of the implementation depends on a good choice. + # A nonce might, for example, be constructed as the base 64 encoding of + # + # time-stamp H(time-stamp ":" ETag ":" private-key) + # + # where time-stamp is a server-generated time or other non-repeating value, + # ETag is the value of the HTTP ETag header associated with the requested entity, + # and private-key is data known only to the server. + # With a nonce of this form a server would recalculate the hash portion after receiving the client authentication header and + # reject the request if it did not match the nonce from that header or + # if the time-stamp value is not recent enough. In this way the server can limit the time of the nonce's validity. + # The inclusion of the ETag prevents a replay request for an updated version of the resource. + # (Note: including the IP address of the client in the nonce would appear to offer the server the ability + # to limit the reuse of the nonce to the same client that originally got it. + # However, that would break proxy farms, where requests from a single user often go through different proxies in the farm. + # Also, IP address spoofing is not that hard.) + # + # An implementation might choose not to accept a previously used nonce or a previously used digest, in order to + # protect against a replay attack. Or, an implementation might choose to use one-time nonces or digests for + # POST, PUT, or PATCH requests, and a time-stamp for GET requests. For more details on the issues involved see Section 4 + # of this document. + # + # The nonce is opaque to the client. Composed of Time, and hash of Time with secret + # key from the Rails session secret generated upon creation of project. Ensures + # the time cannot be modified by client. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#321 + def nonce(secret_key, time = T.unsafe(nil)); end + + # Opaque based on digest of secret key + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#340 + def opaque(secret_key); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#283 + def secret_token(request); end + + # Returns false unless the request credentials response value matches the expected value. + # First try the password as a ha1 digest password. If this fails, then try it as a plain + # text password. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#218 + def validate_digest_response(request, realm, &password_procedure); end + + # Might want a shorter timeout depending on whether the request + # is a PATCH, PUT, or POST, and if the client is a browser or web service. + # Can be much shorter if the Stale directive is implemented. This would + # allow a user to use new nonce without prompting the user again for their + # username and password. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#333 + def validate_nonce(secret_key, request, value, seconds_to_timeout = T.unsafe(nil)); end +end + +# source://actionpack//lib/action_controller/metal/http_authentication.rb#188 +module ActionController::HttpAuthentication::Digest::ControllerMethods + # Authenticate using an HTTP \Digest, or otherwise render an HTTP header + # requesting the client to send a \Digest. + # + # See ActionController::HttpAuthentication::Digest for example usage. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#193 + def authenticate_or_request_with_http_digest(realm = T.unsafe(nil), message = T.unsafe(nil), &password_procedure); end + + # Authenticate using an HTTP \Digest. Returns true if authentication is + # successful, false otherwise. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#199 + def authenticate_with_http_digest(realm = T.unsafe(nil), &password_procedure); end + + # Render an HTTP header requesting the client to send a \Digest for + # authentication. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#205 + def request_http_digest_authentication(realm = T.unsafe(nil), message = T.unsafe(nil)); end +end + +# = HTTP \Token authentication +# +# === Simple \Token example +# +# class PostsController < ApplicationController +# TOKEN = "secret" +# +# before_action :authenticate, except: [ :index ] +# +# def index +# render plain: "Everyone can see me!" +# end +# +# def edit +# render plain: "I'm only accessible if you know the password" +# end +# +# private +# def authenticate +# authenticate_or_request_with_http_token do |token, options| +# # Compare the tokens in a time-constant manner, to mitigate +# # timing attacks. +# ActiveSupport::SecurityUtils.secure_compare(token, TOKEN) +# end +# end +# end +# +# +# Here is a more advanced Token example where only Atom feeds and the XML API are protected by HTTP token authentication. +# The regular HTML interface is protected by a session approach: +# +# class ApplicationController < ActionController::Base +# before_action :set_account, :authenticate +# +# private +# def set_account +# @account = Account.find_by(url_name: request.subdomains.first) +# end +# +# def authenticate +# case request.format +# when Mime[:xml], Mime[:atom] +# if user = authenticate_with_http_token { |t, o| @account.users.authenticate(t, o) } +# @current_user = user +# else +# request_http_token_authentication +# end +# else +# if session_authenticated? +# @current_user = @account.users.find(session[:authenticated][:user_id]) +# else +# redirect_to(login_url) and return false +# end +# end +# end +# end +# +# +# In your integration tests, you can do something like this: +# +# def test_access_granted_from_xml +# authorization = ActionController::HttpAuthentication::Token.encode_credentials(users(:dhh).token) +# +# get "/notes/1.xml", headers: { 'HTTP_AUTHORIZATION' => authorization } +# +# assert_equal 200, status +# end +# +# +# On shared hosts, Apache sometimes doesn't pass authentication headers to +# FCGI instances. If your environment matches this description and you cannot +# authenticate, try this rule in your Apache setup: +# +# RewriteRule ^(.*)$ dispatch.fcgi [E=X-HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,L] +# +# source://actionpack//lib/action_controller/metal/http_authentication.rb#419 +module ActionController::HttpAuthentication::Token + extend ::ActionController::HttpAuthentication::Token + + # If token Authorization header is present, call the login + # procedure with the present token and options. + # + # Returns the return value of login_procedure if a + # token is found. Returns nil if no token is found. + # + # ==== Parameters + # + # * +controller+ - ActionController::Base instance for the current request. + # * +login_procedure+ - Proc to call if a token is present. The Proc + # should take two arguments: + # + # authenticate(controller) { |token, options| ... } + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#461 + def authenticate(controller, &login_procedure); end + + # Sets a WWW-Authenticate header to let the client know a token is desired. + # + # Returns nothing. + # + # ==== Parameters + # + # * +controller+ - ActionController::Base instance for the outgoing response. + # * +realm+ - String realm to use in the header. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#541 + def authentication_request(controller, realm, message = T.unsafe(nil)); end + + # Encodes the given token and options into an Authorization header value. + # + # Returns String. + # + # ==== Parameters + # + # * +token+ - String token. + # * +options+ - Optional Hash of the options. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#526 + def encode_credentials(token, options = T.unsafe(nil)); end + + # Takes +raw_params+ and turns it into an array of parameters. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#496 + def params_array_from(raw_params); end + + # This method takes an authorization body and splits up the key-value + # pairs by the standardized :, ;, or \t + # delimiters defined in +AUTHN_PAIR_DELIMITERS+. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#508 + def raw_params(auth); end + + # This removes the " characters wrapping the value. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#501 + def rewrite_param_values(array_params); end + + # Parses the token and options out of the token Authorization header. + # The value for the Authorization header is expected to have the prefix + # "Token" or "Bearer". If the header looks like this: + # + # Authorization: Token token="abc", nonce="def" + # + # Then the returned token is "abc", and the options are + # {nonce: "def"}. + # + # Returns an +Array+ of [String, Hash] if a token is present. + # Returns +nil+ if no token is found. + # + # ==== Parameters + # + # * +request+ - ActionDispatch::Request instance with the current headers. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#483 + def token_and_options(request); end + + # source://actionpack//lib/action_controller/metal/http_authentication.rb#491 + def token_params_from(auth); end +end + +# source://actionpack//lib/action_controller/metal/http_authentication.rb#422 +ActionController::HttpAuthentication::Token::AUTHN_PAIR_DELIMITERS = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_controller/metal/http_authentication.rb#425 +module ActionController::HttpAuthentication::Token::ControllerMethods + # Authenticate using an HTTP Bearer token, or otherwise render an HTTP + # header requesting the client to send a Bearer token. + # + # See ActionController::HttpAuthentication::Token for example usage. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#430 + def authenticate_or_request_with_http_token(realm = T.unsafe(nil), message = T.unsafe(nil), &login_procedure); end + + # Authenticate using an HTTP Bearer token. Returns true if + # authentication is successful, false otherwise. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#436 + def authenticate_with_http_token(&login_procedure); end + + # Render an HTTP header requesting the client to send a Bearer token for + # authentication. + # + # source://actionpack//lib/action_controller/metal/http_authentication.rb#442 + def request_http_token_authentication(realm = T.unsafe(nil), message = T.unsafe(nil)); end +end + +# source://actionpack//lib/action_controller/metal/http_authentication.rb#420 +ActionController::HttpAuthentication::Token::TOKEN_KEY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_controller/metal/http_authentication.rb#421 +ActionController::HttpAuthentication::Token::TOKEN_REGEX = T.let(T.unsafe(nil), Regexp) + +# Handles implicit rendering for a controller action that does not +# explicitly respond with +render+, +respond_to+, +redirect+, or +head+. +# +# For API controllers, the implicit response is always 204 No Content. +# +# For all other controllers, we use these heuristics to decide whether to +# render a template, raise an error for a missing template, or respond with +# 204 No Content: +# +# First, if we DO find a template, it's rendered. Template lookup accounts +# for the action name, locales, format, variant, template handlers, and more +# (see +render+ for details). +# +# Second, if we DON'T find a template but the controller action does have +# templates for other formats, variants, etc., then we trust that you meant +# to provide a template for this response, too, and we raise +# ActionController::UnknownFormat with an explanation. +# +# Third, if we DON'T find a template AND the request is a page load in a web +# browser (technically, a non-XHR GET request for an HTML response) where +# you reasonably expect to have rendered a template, then we raise +# ActionController::MissingExactTemplate with an explanation. +# +# Finally, if we DON'T find a template AND the request isn't a browser page +# load, then we implicitly respond with 204 No Content. +# +# source://actionpack//lib/action_controller/metal/implicit_render.rb#29 +module ActionController::ImplicitRender + include ::ActionController::BasicImplicitRender + + # source://actionpack//lib/action_controller/metal/implicit_render.rb#33 + def default_render; end + + # source://actionpack//lib/action_controller/metal/implicit_render.rb#52 + def method_for_action(action_name); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/implicit_render.rb#59 + def interactive_browser_request?; end +end + +# Adds instrumentation to several ends in ActionController::Base. It also provides +# some hooks related with process_action. This allows an ORM like Active Record +# and/or DataMapper to plug in ActionController and show related information. +# +# Check ActiveRecord::Railties::ControllerRuntime for an example. +# +# source://actionpack//lib/action_controller/metal/instrumentation.rb#12 +module ActionController::Instrumentation + extend ::ActiveSupport::Concern + include ::ActiveSupport::Benchmarkable + include ::AbstractController::Logger + + mixes_in_class_methods ::ActionController::Instrumentation::ClassMethods + + # source://actionpack//lib/action_controller/metal/instrumentation.rb#40 + def redirect_to(*_arg0); end + + # source://actionpack//lib/action_controller/metal/instrumentation.rb#19 + def render(*_arg0); end + + # source://actionpack//lib/action_controller/metal/instrumentation.rb#34 + def send_data(data, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/metal/instrumentation.rb#27 + def send_file(path, options = T.unsafe(nil)); end + + def view_runtime; end + def view_runtime=(_arg0); end + + private + + # Every time after an action is processed, this method is invoked + # with the payload, so you can add more information. + # + # source://actionpack//lib/action_controller/metal/instrumentation.rb#96 + def append_info_to_payload(payload); end + + # A hook which allows you to clean up any time, wrongly taken into account in + # views, like database querying time. + # + # def cleanup_view_runtime + # super - time_taken_in_something_expensive + # end + # + # source://actionpack//lib/action_controller/metal/instrumentation.rb#90 + def cleanup_view_runtime; end + + # A hook invoked every time a before callback is halted. + # + # source://actionpack//lib/action_controller/metal/instrumentation.rb#80 + def halted_callback_hook(filter, _); end + + # source://actionpack//lib/action_controller/metal/instrumentation.rb#50 + def process_action(*_arg0); end +end + +# source://actionpack//lib/action_controller/metal/instrumentation.rb#100 +module ActionController::Instrumentation::ClassMethods + # A hook which allows other frameworks to log what happened during + # controller process action. This method should return an array + # with the messages to be added. + # + # source://actionpack//lib/action_controller/metal/instrumentation.rb#104 + def log_process_action(payload); end +end + +# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#8 +class ActionController::InvalidAuthenticityToken < ::ActionController::ActionControllerError; end + +# source://actionpack//lib/action_controller/metal/request_forgery_protection.rb#11 +class ActionController::InvalidCrossOriginRequest < ::ActionController::ActionControllerError; end + +# Mix this module into your controller, and all actions in that controller +# will be able to stream data to the client as it's written. +# +# class MyController < ActionController::Base +# include ActionController::Live +# +# def stream +# response.headers['Content-Type'] = 'text/event-stream' +# 100.times { +# response.stream.write "hello world\n" +# sleep 1 +# } +# ensure +# response.stream.close +# end +# end +# +# There are a few caveats with this module. You *cannot* write headers after the +# response has been committed (Response#committed? will return truthy). +# Calling +write+ or +close+ on the response stream will cause the response +# object to be committed. Make sure all headers are set before calling write +# or close on your stream. +# +# You *must* call close on your stream when you're finished, otherwise the +# socket may be left open forever. +# +# The final caveat is that your actions are executed in a separate thread than +# the main thread. Make sure your actions are thread safe, and this shouldn't +# be a problem (don't share state across threads, etc). +# +# source://actionpack//lib/action_controller/metal/live.rb#37 +module ActionController::Live + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::Live::ClassMethods + + # source://actionpack//lib/action_controller/test_case.rb#24 + def new_controller_thread; end + + # source://actionpack//lib/action_controller/metal/live.rb#249 + def process(name); end + + # source://actionpack//lib/action_controller/metal/live.rb#295 + def response_body=(body); end + + # Sends a stream to the browser, which is helpful when you're generating exports or other running data where you + # don't want the entire file buffered in memory first. Similar to send_data, but where the data is generated live. + # + # Options: + # * :filename - suggests a filename for the browser to use. + # * :type - specifies an HTTP content type. + # You can specify either a string or a symbol for a registered type with Mime::Type.register, for example :json. + # If omitted, type will be inferred from the file extension specified in :filename. + # If no content type is registered for the extension, the default type 'application/octet-stream' will be used. + # * :disposition - specifies whether the file will be shown inline or downloaded. + # Valid values are 'inline' and 'attachment' (default). + # + # Example of generating a csv export: + # + # send_stream(filename: "subscribers.csv") do |stream| + # stream.write "email_address,updated_at\n" + # + # @subscribers.find_each do |subscriber| + # stream.write "#{subscriber.email_address},#{subscriber.updated_at}\n" + # end + # end + # + # source://actionpack//lib/action_controller/metal/live.rb#321 + def send_stream(filename:, disposition: T.unsafe(nil), type: T.unsafe(nil)); end + + private + + # source://actionpack//lib/action_controller/metal/live.rb#348 + def log_error(exception); end +end + +# source://actionpack//lib/action_controller/metal/live.rb#127 +class ActionController::Live::Buffer < ::ActionDispatch::Response::Buffer + include ::MonitorMixin + + # @return [Buffer] a new instance of Buffer + # + # source://actionpack//lib/action_controller/metal/live.rb#143 + def initialize(response); end + + # Inform the producer/writing thread that the client has + # disconnected; the reading thread is no longer interested in + # anything that's being written. + # + # See also #close. + # + # source://actionpack//lib/action_controller/metal/live.rb#193 + def abort; end + + # source://actionpack//lib/action_controller/metal/live.rb#212 + def call_on_error; end + + # Write a 'close' event to the buffer; the producer/writing thread + # uses this to notify us that it's finished supplying content. + # + # See also #abort. + # + # source://actionpack//lib/action_controller/metal/live.rb#180 + def close; end + + # Is the client still connected and waiting for content? + # + # The result of calling `write` when this is `false` is determined + # by `ignore_disconnect`. + # + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/live.rb#204 + def connected?; end + + # Ignore that the client has disconnected. + # + # If this value is `true`, calling `write` after the client + # disconnects will result in the written content being silently + # discarded. If this value is `false` (the default), a + # ClientDisconnected exception will be raised. + # + # source://actionpack//lib/action_controller/metal/live.rb#141 + def ignore_disconnect; end + + # Ignore that the client has disconnected. + # + # If this value is `true`, calling `write` after the client + # disconnects will result in the written content being silently + # discarded. If this value is `false` (the default), a + # ClientDisconnected exception will be raised. + # + # source://actionpack//lib/action_controller/metal/live.rb#141 + def ignore_disconnect=(_arg0); end + + # source://actionpack//lib/action_controller/metal/live.rb#208 + def on_error(&block); end + + # source://actionpack//lib/action_controller/metal/live.rb#151 + def write(string); end + + # Same as +write+ but automatically include a newline at the end of the string. + # + # source://actionpack//lib/action_controller/metal/live.rb#172 + def writeln(string); end + + private + + # source://actionpack//lib/action_controller/metal/live.rb#228 + def build_queue(queue_size); end + + # source://actionpack//lib/action_controller/metal/live.rb#217 + def each_chunk(&block); end + + class << self + # Returns the value of attribute queue_size. + # + # source://actionpack//lib/action_controller/metal/live.rb#131 + def queue_size; end + + # Sets the attribute queue_size + # + # @param value the value to set the attribute queue_size to. + # + # source://actionpack//lib/action_controller/metal/live.rb#131 + def queue_size=(_arg0); end + end +end + +# source://actionpack//lib/action_controller/metal/live.rb#40 +module ActionController::Live::ClassMethods + # source://actionpack//lib/action_controller/metal/live.rb#41 + def make_response!(request); end +end + +# source://actionpack//lib/action_controller/metal/live.rb#124 +class ActionController::Live::ClientDisconnected < ::RuntimeError; end + +# source://actionpack//lib/action_controller/metal/live.rb#233 +class ActionController::Live::Response < ::ActionDispatch::Response + private + + # source://actionpack//lib/action_controller/metal/live.rb#235 + def before_committed; end + + # source://actionpack//lib/action_controller/metal/live.rb#242 + def build_buffer(response, body); end +end + +# This class provides the ability to write an SSE (Server Sent Event) +# to an IO stream. The class is initialized with a stream and can be used +# to either write a JSON string or an object which can be converted to JSON. +# +# Writing an object will convert it into standard SSE format with whatever +# options you have configured. You may choose to set the following options: +# +# 1) Event. If specified, an event with this name will be dispatched on +# the browser. +# 2) Retry. The reconnection time in milliseconds used when attempting +# to send the event. +# 3) Id. If the connection dies while sending an SSE to the browser, then +# the server will receive a +Last-Event-ID+ header with value equal to +id+. +# +# After setting an option in the constructor of the SSE object, all future +# SSEs sent across the stream will use those options unless overridden. +# +# Example Usage: +# +# class MyController < ActionController::Base +# include ActionController::Live +# +# def index +# response.headers['Content-Type'] = 'text/event-stream' +# sse = SSE.new(response.stream, retry: 300, event: "event-name") +# sse.write({ name: 'John'}) +# sse.write({ name: 'John'}, id: 10) +# sse.write({ name: 'John'}, id: 10, event: "other-event") +# sse.write({ name: 'John'}, id: 10, event: "other-event", retry: 500) +# ensure +# sse.close +# end +# end +# +# Note: SSEs are not currently supported by IE. However, they are supported +# by Chrome, Firefox, Opera, and Safari. +# +# source://actionpack//lib/action_controller/metal/live.rb#88 +class ActionController::Live::SSE + # @return [SSE] a new instance of SSE + # + # source://actionpack//lib/action_controller/metal/live.rb#91 + def initialize(stream, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/metal/live.rb#96 + def close; end + + # source://actionpack//lib/action_controller/metal/live.rb#100 + def write(object, options = T.unsafe(nil)); end + + private + + # source://actionpack//lib/action_controller/metal/live.rb#110 + def perform_write(json, options); end +end + +# source://actionpack//lib/action_controller/metal/live.rb#89 +ActionController::Live::SSE::PERMITTED_OPTIONS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_controller/test_case.rb#170 +class ActionController::LiveTestResponse < ::ActionController::Live::Response + # Was there a server-side error? + # + # source://rack/2.2.6.4/lib/rack/response.rb#141 + def error?; end + + # Was the URL not found? + # + # source://rack/2.2.6.4/lib/rack/response.rb#151 + def missing?; end + + # Was the response successful? + # + # source://rack/2.2.6.4/lib/rack/response.rb#138 + def success?; end +end + +# source://actionpack//lib/action_controller/log_subscriber.rb#4 +class ActionController::LogSubscriber < ::ActiveSupport::LogSubscriber + # source://actionpack//lib/action_controller/log_subscriber.rb#67 + def exist_fragment?(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#67 + def expire_fragment(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#40 + def halted_callback(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#76 + def logger; end + + # source://actionpack//lib/action_controller/log_subscriber.rb#20 + def process_action(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#67 + def read_fragment(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#48 + def redirect_to(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#52 + def send_data(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#44 + def send_file(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#7 + def start_processing(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#56 + def unpermitted_parameters(event); end + + # source://actionpack//lib/action_controller/log_subscriber.rb#67 + def write_fragment(event); end +end + +# source://actionpack//lib/action_controller/log_subscriber.rb#5 +ActionController::LogSubscriber::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_controller/metal/logging.rb#4 +module ActionController::Logging + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::Logging::ClassMethods +end + +# source://actionpack//lib/action_controller/metal/logging.rb#7 +module ActionController::Logging::ClassMethods + # Set a different log level per request. + # + # # Use the debug log level if a particular cookie is set. + # class ApplicationController < ActionController::Base + # log_at :debug, if: -> { cookies[:debug] } + # end + # + # source://actionpack//lib/action_controller/metal/logging.rb#15 + def log_at(level, **options); end +end + +# ActionController::Metal is the simplest possible controller, providing a +# valid Rack interface without the additional niceties provided by +# ActionController::Base. +# +# A sample metal controller might look like this: +# +# class HelloController < ActionController::Metal +# def index +# self.response_body = "Hello World!" +# end +# end +# +# And then to route requests to your metal controller, you would add +# something like this to config/routes.rb: +# +# get 'hello', to: HelloController.action(:index) +# +# The +action+ method returns a valid Rack application for the \Rails +# router to dispatch to. +# +# == Rendering Helpers +# +# ActionController::Metal by default provides no utilities for rendering +# views, partials, or other responses aside from explicitly calling of +# response_body=, content_type=, and status=. To +# add the render helpers you're used to having in a normal controller, you +# can do the following: +# +# class HelloController < ActionController::Metal +# include AbstractController::Rendering +# include ActionView::Layouts +# append_view_path "#{Rails.root}/app/views" +# +# def index +# render "hello/index" +# end +# end +# +# == Redirection Helpers +# +# To add redirection helpers to your metal controller, do the following: +# +# class HelloController < ActionController::Metal +# include ActionController::Redirecting +# include Rails.application.routes.url_helpers +# +# def index +# redirect_to root_url +# end +# end +# +# == Other Helpers +# +# You can refer to the modules included in ActionController::Base to see +# other features you can bring into your metal controller. +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://actionpack//lib/action_controller/metal.rb#117 +class ActionController::Metal < ::AbstractController::Base + include ::ActionController::Testing::Functional + + # @return [Metal] a new instance of Metal + # + # source://actionpack//lib/action_controller/metal.rb#150 + def initialize; end + + # source://actionpack//lib/action_controller/metal.rb#147 + def content_type(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal.rb#147 + def content_type=(arg); end + + # Delegates to the class's ::controller_name. + # + # source://actionpack//lib/action_controller/metal.rb#141 + def controller_name; end + + # source://actionpack//lib/action_controller/metal.rb#185 + def dispatch(name, request, response); end + + # source://actionpack//lib/action_controller/metal.rb#147 + def headers(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal.rb#147 + def location(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal.rb#147 + def location=(arg); end + + # source://actionpack//lib/action_controller/metal.rb#147 + def media_type(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal.rb#210 + def middleware_stack; end + + # source://actionpack//lib/action_controller/metal.rb#210 + def middleware_stack=(_arg0); end + + # source://actionpack//lib/action_controller/metal.rb#210 + def middleware_stack?; end + + # source://actionpack//lib/action_controller/metal.rb#157 + def params; end + + # source://actionpack//lib/action_controller/metal.rb#161 + def params=(val); end + + # Tests if render or redirect has already happened. + # + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal.rb#181 + def performed?; end + + # source://activesupport/7.0.4.3/lib/active_support/core_ext/module/attr_internal.rb#33 + def request; end + + # source://activesupport/7.0.4.3/lib/active_support/core_ext/module/attr_internal.rb#33 + def request=(_arg0); end + + # source://actionpack//lib/action_controller/metal.rb#206 + def reset_session; end + + # source://activesupport/7.0.4.3/lib/active_support/core_ext/module/attr_internal.rb#33 + def response; end + + # source://activesupport/7.0.4.3/lib/active_support/core_ext/module/attr_internal.rb#33 + def response=(_arg0); end + + # source://actionpack//lib/action_controller/metal.rb#172 + def response_body=(body); end + + # source://actionpack//lib/action_controller/metal.rb#147 + def response_code(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal.rb#146 + def session(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal.rb#197 + def set_request!(request); end + + # source://actionpack//lib/action_controller/metal.rb#193 + def set_response!(response); end + + # source://actionpack//lib/action_controller/metal.rb#147 + def status(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal.rb#147 + def status=(arg); end + + # source://actionpack//lib/action_controller/metal.rb#202 + def to_a; end + + # Basic url_for that can be overridden for more robust functionality. + # + # source://actionpack//lib/action_controller/metal.rb#168 + def url_for(string); end + + class << self + # Returns a Rack endpoint for the given action name. + # + # source://actionpack//lib/action_controller/metal.rb#231 + def action(name); end + + # source://actionpack//lib/action_controller/metal.rb#136 + def action_encoding_template(action); end + + # Returns the last part of the controller's name, underscored, without the ending + # Controller. For instance, PostsController returns posts. + # Namespaces are left out, so Admin::PostsController returns posts as well. + # + # ==== Returns + # * string + # + # source://actionpack//lib/action_controller/metal.rb#126 + def controller_name; end + + # Direct dispatch to the controller. Instantiates the controller, then + # executes the action named +name+. + # + # source://actionpack//lib/action_controller/metal.rb#247 + def dispatch(name, req, res); end + + # source://actionpack//lib/action_controller/metal.rb#212 + def inherited(base); end + + # source://actionpack//lib/action_controller/metal.rb#130 + def make_response!(request); end + + # Alias for +middleware_stack+. + # + # source://actionpack//lib/action_controller/metal.rb#226 + def middleware; end + + # source://actionpack//lib/action_controller/metal.rb#210 + def middleware_stack; end + + # source://actionpack//lib/action_controller/metal.rb#210 + def middleware_stack=(value); end + + # source://actionpack//lib/action_controller/metal.rb#210 + def middleware_stack?; end + + # Pushes the given Rack middleware and its arguments to the bottom of the + # middleware stack. + # + # source://actionpack//lib/action_controller/metal.rb#220 + def use(*_arg0, **_arg1, &_arg2); end + end +end + +# source://actionpack//lib/action_controller/metal/exceptions.rb#50 +class ActionController::MethodNotAllowed < ::ActionController::ActionControllerError + # @return [MethodNotAllowed] a new instance of MethodNotAllowed + # + # source://actionpack//lib/action_controller/metal/exceptions.rb#51 + def initialize(*allowed_methods); end +end + +# Extend ActionDispatch middleware stack to make it aware of options +# allowing the following syntax in controllers: +# +# class PostsController < ApplicationController +# use AuthenticationMiddleware, except: [:index, :show] +# end +# +# source://actionpack//lib/action_controller/metal.rb#14 +class ActionController::MiddlewareStack < ::ActionDispatch::MiddlewareStack + # source://actionpack//lib/action_controller/metal.rb#27 + def build(action, app = T.unsafe(nil), &block); end + + private + + # source://actionpack//lib/action_controller/metal.rb#40 + def build_middleware(klass, args, block); end +end + +# source://actionpack//lib/action_controller/metal.rb#37 +ActionController::MiddlewareStack::EXCLUDE = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_controller/metal.rb#36 +ActionController::MiddlewareStack::INCLUDE = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_controller/metal.rb#15 +class ActionController::MiddlewareStack::Middleware < ::ActionDispatch::MiddlewareStack::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://actionpack//lib/action_controller/metal.rb#16 + def initialize(klass, args, actions, strategy, block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal.rb#22 + def valid?(action); end +end + +# source://actionpack//lib/action_controller/metal.rb#38 +ActionController::MiddlewareStack::NULL = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_controller/metal/mime_responds.rb#6 +module ActionController::MimeResponds + # Without web-service support, an action which collects the data for displaying a list of people + # might look something like this: + # + # def index + # @people = Person.all + # end + # + # That action implicitly responds to all formats, but formats can also be explicitly enumerated: + # + # def index + # @people = Person.all + # respond_to :html, :js + # end + # + # Here's the same action, with web-service support baked in: + # + # def index + # @people = Person.all + # + # respond_to do |format| + # format.html + # format.js + # format.xml { render xml: @people } + # end + # end + # + # What that says is, "if the client wants HTML or JS in response to this action, just respond as we + # would have before, but if the client wants XML, return them the list of people in XML format." + # (Rails determines the desired response format from the HTTP Accept header submitted by the client.) + # + # Supposing you have an action that adds a new person, optionally creating their company + # (by name) if it does not already exist, without web-services, it might look like this: + # + # def create + # @company = Company.find_or_create_by(name: params[:company][:name]) + # @person = @company.people.create(params[:person]) + # + # redirect_to(person_list_url) + # end + # + # Here's the same action, with web-service support baked in: + # + # def create + # company = params[:person].delete(:company) + # @company = Company.find_or_create_by(name: company[:name]) + # @person = @company.people.create(params[:person]) + # + # respond_to do |format| + # format.html { redirect_to(person_list_url) } + # format.js + # format.xml { render xml: @person.to_xml(include: @company) } + # end + # end + # + # If the client wants HTML, we just redirect them back to the person list. If they want JavaScript, + # then it is an Ajax request and we render the JavaScript template associated with this action. + # Lastly, if the client wants XML, we render the created person as XML, but with a twist: we also + # include the person's company in the rendered XML, so you get something like this: + # + # + # ... + # ... + # + # ... + # ... + # ... + # + # + # + # Note, however, the extra bit at the top of that action: + # + # company = params[:person].delete(:company) + # @company = Company.find_or_create_by(name: company[:name]) + # + # This is because the incoming XML document (if a web-service request is in process) can only contain a + # single root-node. So, we have to rearrange things so that the request looks like this (url-encoded): + # + # person[name]=...&person[company][name]=...&... + # + # And, like this (xml-encoded): + # + # + # ... + # + # ... + # + # + # + # In other words, we make the request so that it operates on a single entity's person. Then, in the action, + # we extract the company data from the request, find or create the company, and then create the new person + # with the remaining data. + # + # Note that you can define your own XML parameter parser which would allow you to describe multiple entities + # in a single request (i.e., by wrapping them all in a single root node), but if you just go with the flow + # and accept Rails' defaults, life will be much easier. + # + # If you need to use a MIME type which isn't supported by default, you can register your own handlers in + # +config/initializers/mime_types.rb+ as follows. + # + # Mime::Type.register "image/jpeg", :jpg + # + # +respond_to+ also allows you to specify a common block for different formats by using +any+: + # + # def index + # @people = Person.all + # + # respond_to do |format| + # format.html + # format.any(:xml, :json) { render request.format.to_sym => @people } + # end + # end + # + # In the example above, if the format is xml, it will render: + # + # render xml: @people + # + # Or if the format is json: + # + # render json: @people + # + # +any+ can also be used with no arguments, in which case it will be used for any format requested by + # the user: + # + # respond_to do |format| + # format.html + # format.any { redirect_to support_path } + # end + # + # Formats can have different variants. + # + # The request variant is a specialization of the request format, like :tablet, + # :phone, or :desktop. + # + # We often want to render different html/json/xml templates for phones, + # tablets, and desktop browsers. Variants make it easy. + # + # You can set the variant in a +before_action+: + # + # request.variant = :tablet if /iPad/.match?(request.user_agent) + # + # Respond to variants in the action just like you respond to formats: + # + # respond_to do |format| + # format.html do |variant| + # variant.tablet # renders app/views/projects/show.html+tablet.erb + # variant.phone { extra_setup; render ... } + # variant.none { special_setup } # executed only if there is no variant set + # end + # end + # + # Provide separate templates for each format and variant: + # + # app/views/projects/show.html.erb + # app/views/projects/show.html+tablet.erb + # app/views/projects/show.html+phone.erb + # + # When you're not sharing any code within the format, you can simplify defining variants + # using the inline syntax: + # + # respond_to do |format| + # format.js { render "trash" } + # format.html.phone { redirect_to progress_path } + # format.html.none { render "trash" } + # end + # + # Variants also support common +any+/+all+ block that formats have. + # + # It works for both inline: + # + # respond_to do |format| + # format.html.any { render html: "any" } + # format.html.phone { render html: "phone" } + # end + # + # and block syntax: + # + # respond_to do |format| + # format.html do |variant| + # variant.any(:tablet, :phablet){ render html: "any" } + # variant.phone { render html: "phone" } + # end + # end + # + # You can also set an array of variants: + # + # request.variant = [:tablet, :phone] + # + # This will work similarly to formats and MIME types negotiation. If there + # is no +:tablet+ variant declared, the +:phone+ variant will be used: + # + # respond_to do |format| + # format.html.none + # format.html.phone # this gets rendered + # end + # + # @raise [ArgumentError] + # @yield [collector] + # + # source://actionpack//lib/action_controller/metal/mime_responds.rb#201 + def respond_to(*mimes); end +end + +# A container for responses available from the current controller for +# requests for different mime-types sent to a particular action. +# +# The public controller methods +respond_to+ may be called with a block +# that is used to define responses to different mime-types, e.g. +# for +respond_to+ : +# +# respond_to do |format| +# format.html +# format.xml { render xml: @people } +# end +# +# In this usage, the argument passed to the block (+format+ above) is an +# instance of the ActionController::MimeResponds::Collector class. This +# object serves as a container in which available responses can be stored by +# calling any of the dynamically generated, mime-type-specific methods such +# as +html+, +xml+ etc on the Collector. Each response is represented by a +# corresponding block if present. +# +# A subsequent call to #negotiate_format(request) will enable the Collector +# to determine which specific mime-type it should respond with for the current +# request, with this response then being accessible by calling #response. +# +# source://actionpack//lib/action_controller/metal/mime_responds.rb#242 +class ActionController::MimeResponds::Collector + include ::AbstractController::Collector + + # @return [Collector] a new instance of Collector + # + # source://actionpack//lib/action_controller/metal/mime_responds.rb#246 + def initialize(mimes, variant = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#253 + def all(*args, &block); end + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#253 + def any(*args, &block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/mime_responds.rb#271 + def any_response?; end + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#262 + def custom(mime_type, &block); end + + # Returns the value of attribute format. + # + # source://actionpack//lib/action_controller/metal/mime_responds.rb#244 + def format; end + + # Sets the attribute format + # + # @param value the value to set the attribute format to. + # + # source://actionpack//lib/action_controller/metal/mime_responds.rb#244 + def format=(_arg0); end + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#288 + def negotiate_format(request); end + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#275 + def response; end +end + +# source://actionpack//lib/action_controller/metal/mime_responds.rb#292 +class ActionController::MimeResponds::Collector::VariantCollector + # @return [VariantCollector] a new instance of VariantCollector + # + # source://actionpack//lib/action_controller/metal/mime_responds.rb#293 + def initialize(variant = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#298 + def all(*args, &block); end + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#298 + def any(*args, &block); end + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#309 + def method_missing(name, *args, &block); end + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#313 + def variant; end + + private + + # source://actionpack//lib/action_controller/metal/mime_responds.rb#322 + def variant_key; end +end + +# source://actionpack//lib/action_controller/metal/exceptions.rb#94 +class ActionController::MissingExactTemplate < ::ActionController::UnknownFormat; end + +# source://actionpack//lib/action_controller/metal/exceptions.rb#59 +class ActionController::MissingFile < ::ActionController::ActionControllerError; end + +# See Responder#api_behavior +# +# source://actionpack//lib/action_controller/metal/renderers.rb#17 +class ActionController::MissingRenderer < ::LoadError + # @return [MissingRenderer] a new instance of MissingRenderer + # + # source://actionpack//lib/action_controller/metal/renderers.rb#18 + def initialize(format); end +end + +# source://actionpack//lib/action_controller/metal/exceptions.rb#56 +class ActionController::NotImplemented < ::ActionController::MethodNotAllowed; end + +# Specify binary encoding for parameters for a given action. +# +# source://actionpack//lib/action_controller/metal/parameter_encoding.rb#5 +module ActionController::ParameterEncoding + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::ParameterEncoding::ClassMethods +end + +# source://actionpack//lib/action_controller/metal/parameter_encoding.rb#8 +module ActionController::ParameterEncoding::ClassMethods + # source://actionpack//lib/action_controller/metal/parameter_encoding.rb#18 + def action_encoding_template(action); end + + # source://actionpack//lib/action_controller/metal/parameter_encoding.rb#9 + def inherited(klass); end + + # Specify the encoding for a parameter on an action. + # If not specified the default is UTF-8. + # + # You can specify a binary (ASCII_8BIT) parameter with: + # + # class RepositoryController < ActionController::Base + # # This specifies that file_path is not UTF-8 and is instead ASCII_8BIT + # param_encoding :show, :file_path, Encoding::ASCII_8BIT + # + # def show + # @repo = Repository.find_by_filesystem_path params[:file_path] + # + # # params[:repo_name] remains UTF-8 encoded + # @repo_name = params[:repo_name] + # end + # + # def index + # @repositories = Repository.all + # end + # end + # + # The file_path parameter on the show action would be encoded as ASCII-8BIT, + # but all other arguments will remain UTF-8 encoded. + # This is useful in the case where an application must handle data + # but encoding of the data is unknown, like file system data. + # + # source://actionpack//lib/action_controller/metal/parameter_encoding.rb#77 + def param_encoding(action, param, encoding); end + + # source://actionpack//lib/action_controller/metal/parameter_encoding.rb#14 + def setup_param_encode; end + + # Specify that a given action's parameters should all be encoded as + # ASCII-8BIT (it "skips" the encoding default of UTF-8). + # + # For example, a controller would use it like this: + # + # class RepositoryController < ActionController::Base + # skip_parameter_encoding :show + # + # def show + # @repo = Repository.find_by_filesystem_path params[:file_path] + # + # # `repo_name` is guaranteed to be UTF-8, but was ASCII-8BIT, so + # # tag it as such + # @repo_name = params[:repo_name].force_encoding 'UTF-8' + # end + # + # def index + # @repositories = Repository.all + # end + # end + # + # The show action in the above controller would have all parameter values + # encoded as ASCII-8BIT. This is useful in the case where an application + # must handle data but encoding of the data is unknown, like file system data. + # + # source://actionpack//lib/action_controller/metal/parameter_encoding.rb#48 + def skip_parameter_encoding(action); end +end + +# Raised when a required parameter is missing. +# +# params = ActionController::Parameters.new(a: {}) +# params.fetch(:b) +# # => ActionController::ParameterMissing: param is missing or the value is empty: b +# params.require(:a) +# # => ActionController::ParameterMissing: param is missing or the value is empty: a +# +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#21 +class ActionController::ParameterMissing < ::KeyError + # @return [ParameterMissing] a new instance of ParameterMissing + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#24 + def initialize(param, keys = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#33 + def corrections; end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#22 + def keys; end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#22 + def param; end +end + +# == Action Controller \Parameters +# +# Allows you to choose which attributes should be permitted for mass updating +# and thus prevent accidentally exposing that which shouldn't be exposed. +# Provides two methods for this purpose: #require and #permit. The former is +# used to mark parameters as required. The latter is used to set the parameter +# as permitted and limit which attributes should be allowed for mass updating. +# +# params = ActionController::Parameters.new({ +# person: { +# name: "Francesco", +# age: 22, +# role: "admin" +# } +# }) +# +# permitted = params.require(:person).permit(:name, :age) +# permitted # => #"Francesco", "age"=>22} permitted: true> +# permitted.permitted? # => true +# +# Person.first.update!(permitted) +# # => # +# +# It provides two options that controls the top-level behavior of new instances: +# +# * +permit_all_parameters+ - If it's +true+, all the parameters will be +# permitted by default. The default is +false+. +# * +action_on_unpermitted_parameters+ - Controls behavior when parameters that are not explicitly +# permitted are found. The default value is :log in test and development environments, +# +false+ otherwise. The values can be: +# * +false+ to take no action. +# * :log to emit an ActiveSupport::Notifications.instrument event on the +# unpermitted_parameters.action_controller topic and log at the DEBUG level. +# * :raise to raise a ActionController::UnpermittedParameters exception. +# +# Examples: +# +# params = ActionController::Parameters.new +# params.permitted? # => false +# +# ActionController::Parameters.permit_all_parameters = true +# +# params = ActionController::Parameters.new +# params.permitted? # => true +# +# params = ActionController::Parameters.new(a: "123", b: "456") +# params.permit(:c) +# # => # +# +# ActionController::Parameters.action_on_unpermitted_parameters = :raise +# +# params = ActionController::Parameters.new(a: "123", b: "456") +# params.permit(:c) +# # => ActionController::UnpermittedParameters: found unpermitted keys: a, b +# +# Please note that these options *are not thread-safe*. In a multi-threaded +# environment they should only be set once at boot-time and never mutated at +# runtime. +# +# You can fetch values of ActionController::Parameters using either +# :key or "key". +# +# params = ActionController::Parameters.new(key: "value") +# params[:key] # => "value" +# params["key"] # => "value" +# +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#132 +class ActionController::Parameters + # Returns a new instance of ActionController::Parameters. + # Also, sets the +permitted+ attribute to the default value of + # ActionController::Parameters.permit_all_parameters. + # + # class Person < ActiveRecord::Base + # end + # + # params = ActionController::Parameters.new(name: "Francesco") + # params.permitted? # => false + # Person.new(params) # => ActiveModel::ForbiddenAttributesError + # + # ActionController::Parameters.permit_all_parameters = true + # + # params = ActionController::Parameters.new(name: "Francesco") + # params.permitted? # => true + # Person.new(params) # => # + # + # @return [Parameters] a new instance of Parameters + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#267 + def initialize(parameters = T.unsafe(nil), logging_context = T.unsafe(nil)); end + + # Returns true if another +Parameters+ object contains the same content and + # permitted flag. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#275 + def ==(other); end + + # Returns a parameter for the given +key+. If not found, + # returns +nil+. + # + # params = ActionController::Parameters.new(person: { name: "Francesco" }) + # params[:person] # => #"Francesco"} permitted: false> + # params[:none] # => nil + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#643 + def [](key); end + + # Assigns a value to a given +key+. The given key may still get filtered out + # when +permit+ is called. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#649 + def []=(key, value); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#243 + def always_permitted_parameters; end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#243 + def always_permitted_parameters=(val); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 + def as_json(*_arg0, **_arg1, &_arg2); end + + # Returns a new instance of ActionController::Parameters with +nil+ values removed. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#819 + def compact; end + + # Removes all +nil+ values in place and returns +self+, or +nil+ if no changes were made. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#824 + def compact!; end + + # Returns a new instance of ActionController::Parameters without the blank values. + # Uses Object#blank? for determining if a value is blank. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#830 + def compact_blank; end + + # Removes all blank values in place and returns self. + # Uses Object#blank? for determining if a value is blank. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#836 + def compact_blank!; end + + # Attribute that keeps track of converted arrays, if any, to avoid double + # looping in the common use case permit + mass-assignment. Defined in a + # method to instantiate it only if needed. + # + # Testing membership still loops, but it's going to be faster than our own + # loop that converts values. Also, we are not going to build a new array + # object per fetch. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#407 + def converted_arrays; end + + # Returns duplicate of object including all parameters. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#921 + def deep_dup; end + + # Returns a new ActionController::Parameters instance with the + # results of running +block+ once for every key. This includes the keys + # from the root hash and from all nested hashes and arrays. The values are unchanged. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#770 + def deep_transform_keys(&block); end + + # Returns the ActionController::Parameters instance changing its keys. + # This includes the keys from the root hash and from all nested hashes and arrays. + # The values are unchanged. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#779 + def deep_transform_keys!(&block); end + + # Deletes a key-value pair from +Parameters+ and returns the value. If + # +key+ is not found, returns +nil+ (or, with optional code block, yields + # +key+ and returns the result). Cf. #extract!, which returns the + # corresponding +ActionController::Parameters+ object. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#788 + def delete(key, &block); end + + # Removes items that the block evaluates to true and returns self. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#812 + def delete_if(&block); end + + # Extracts the nested parameter from the given +keys+ by calling +dig+ + # at each step. Returns +nil+ if any intermediate step is +nil+. + # + # params = ActionController::Parameters.new(foo: { bar: { baz: 1 } }) + # params.dig(:foo, :bar, :baz) # => 1 + # params.dig(:foo, :zot, :xyz) # => nil + # + # params2 = ActionController::Parameters.new(foo: [10, 11, 12]) + # params2.dig(:foo, 1) # => 11 + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#687 + def dig(*keys); end + + # Convert all hashes in values into parameters, then yield each pair in + # the same way as Hash#each_pair. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#379 + def each(&block); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 + def each_key(*_arg0, **_arg1, &_arg2); end + + # Convert all hashes in values into parameters, then yield each pair in + # the same way as Hash#each_pair. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#379 + def each_pair(&block); end + + # Convert all hashes in values into parameters, then yield each value in + # the same way as Hash#each_value. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#391 + def each_value(&block); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 + def empty?(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#916 + def encode_with(coder); end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#283 + def eql?(other); end + + # Returns a new ActionController::Parameters instance that + # filters out the given +keys+. + # + # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) + # params.except(:a, :b) # => #3} permitted: false> + # params.except(:d) # => #1, "b"=>2, "c"=>3} permitted: false> + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#716 + def except(*keys); end + + # Removes and returns the key/value pairs matching the given keys. + # + # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) + # params.extract!(:a, :b) # => #1, "b"=>2} permitted: false> + # params # => #3} permitted: false> + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#725 + def extract!(*keys); end + + # Returns a parameter for the given +key+. If the +key+ + # can't be found, there are several options: With no other arguments, + # it will raise an ActionController::ParameterMissing error; + # if a second argument is given, then that is returned (converted to an + # instance of ActionController::Parameters if possible); if a block + # is given, then that will be run and its result returned. + # + # params = ActionController::Parameters.new(person: { name: "Francesco" }) + # params.fetch(:person) # => #"Francesco"} permitted: false> + # params.fetch(:none) # => ActionController::ParameterMissing: param is missing or the value is empty: none + # params.fetch(:none, {}) # => # + # params.fetch(:none, "Francesco") # => "Francesco" + # params.fetch(:none) { "Francesco" } # => "Francesco" + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#666 + def fetch(key, *args); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 + def has_key?(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 + def has_value?(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#289 + def hash; end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 + def include?(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#898 + def init_with(coder); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#885 + def inspect; end + + # Equivalent to Hash#keep_if, but returns +nil+ if no changes were made. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#799 + def keep_if(&block); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 + def key?(*_arg0, **_arg1, &_arg2); end + + # :method: values + # + # :call-seq: + # values() + # + # Returns a new array of the values of the parameters. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 + def keys(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 + def member?(*_arg0, **_arg1, &_arg2); end + + # Returns a new ActionController::Parameters with all keys from + # +other_hash+ merged into current hash. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#848 + def merge(other_hash); end + + # Returns current ActionController::Parameters instance with + # +other_hash+ merged into current hash. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#856 + def merge!(other_hash); end + + # Returns a new ActionController::Parameters instance that + # includes only the given +filters+ and sets the +permitted+ attribute + # for the object to +true+. This is useful for limiting which attributes + # should be allowed for mass updating. + # + # params = ActionController::Parameters.new(user: { name: "Francesco", age: 22, role: "admin" }) + # permitted = params.require(:user).permit(:name, :age) + # permitted.permitted? # => true + # permitted.has_key?(:name) # => true + # permitted.has_key?(:age) # => true + # permitted.has_key?(:role) # => false + # + # Only permitted scalars pass the filter. For example, given + # + # params.permit(:name) + # + # +:name+ passes if it is a key of +params+ whose associated value is of type + # +String+, +Symbol+, +NilClass+, +Numeric+, +TrueClass+, +FalseClass+, + # +Date+, +Time+, +DateTime+, +StringIO+, +IO+, + # +ActionDispatch::Http::UploadedFile+ or +Rack::Test::UploadedFile+. + # Otherwise, the key +:name+ is filtered out. + # + # You may declare that the parameter should be an array of permitted scalars + # by mapping it to an empty array: + # + # params = ActionController::Parameters.new(tags: ["rails", "parameters"]) + # params.permit(tags: []) + # + # Sometimes it is not possible or convenient to declare the valid keys of + # a hash parameter or its internal structure. Just map to an empty hash: + # + # params.permit(preferences: {}) + # + # Be careful because this opens the door to arbitrary input. In this + # case, +permit+ ensures values in the returned structure are permitted + # scalars and filters out anything else. + # + # You can also use +permit+ on nested parameters, like: + # + # params = ActionController::Parameters.new({ + # person: { + # name: "Francesco", + # age: 22, + # pets: [{ + # name: "Purplish", + # category: "dogs" + # }] + # } + # }) + # + # permitted = params.permit(person: [ :name, { pets: :name } ]) + # permitted.permitted? # => true + # permitted[:person][:name] # => "Francesco" + # permitted[:person][:age] # => nil + # permitted[:person][:pets][0][:name] # => "Purplish" + # permitted[:person][:pets][0][:category] # => nil + # + # Note that if you use +permit+ in a key that points to a hash, + # it won't allow all the hash. You also need to specify which + # attributes inside the hash should be permitted. + # + # params = ActionController::Parameters.new({ + # person: { + # contact: { + # email: "none@test.com", + # phone: "555-1234" + # } + # } + # }) + # + # params.require(:person).permit(:contact) + # # => # + # + # params.require(:person).permit(contact: :phone) + # # => ##"555-1234"} permitted: true>} permitted: true> + # + # params.require(:person).permit(contact: [ :email, :phone ]) + # # => ##"none@test.com", "phone"=>"555-1234"} permitted: true>} permitted: true> + # + # If your parameters specify multiple parameters indexed by a number, + # you can permit each set of parameters under the numeric key to be the same using the same syntax as permitting a single item. + # + # params = ActionController::Parameters.new({ + # person: { + # '0': { + # email: "none@test.com", + # phone: "555-1234" + # }, + # '1': { + # email: "nothing@test.com", + # phone: "555-6789" + # }, + # } + # }) + # params.permit(person: [:email]).to_h + # # => {"person"=>{"0"=>{"email"=>"none@test.com"}, "1"=>{"email"=>"nothing@test.com"}}} + # + # If you want to specify what keys you want from each numeric key, you can instead specify each one individually + # + # params = ActionController::Parameters.new({ + # person: { + # '0': { + # email: "none@test.com", + # phone: "555-1234" + # }, + # '1': { + # email: "nothing@test.com", + # phone: "555-6789" + # }, + # } + # }) + # params.permit(person: { '0': [:email], '1': [:phone]}).to_h + # # => {"person"=>{"0"=>{"email"=>"none@test.com"}, "1"=>{"phone"=>"555-6789"}}} + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#620 + def permit(*filters); end + + # Sets the +permitted+ attribute to +true+. This can be used to pass + # mass assignment. Returns +self+. + # + # class Person < ActiveRecord::Base + # end + # + # params = ActionController::Parameters.new(name: "Francesco") + # params.permitted? # => false + # Person.new(params) # => ActiveModel::ForbiddenAttributesError + # params.permit! + # params.permitted? # => true + # Person.new(params) # => # + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#433 + def permit!; end + + # Returns +true+ if the parameter is permitted, +false+ otherwise. + # + # params = ActionController::Parameters.new + # params.permitted? # => false + # params.permit! + # params.permitted? # => true + # + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#417 + def permitted?; end + + # Returns a new instance of ActionController::Parameters with items + # that the block evaluates to true removed. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#807 + def reject(&block); end + + # Removes items that the block evaluates to true and returns self. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#812 + def reject!(&block); end + + # This method accepts both a single key and an array of keys. + # + # When passed a single key, if it exists and its associated value is + # either present or the singleton +false+, returns said value: + # + # ActionController::Parameters.new(person: { name: "Francesco" }).require(:person) + # # => #"Francesco"} permitted: false> + # + # Otherwise raises ActionController::ParameterMissing: + # + # ActionController::Parameters.new.require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty: person + # + # ActionController::Parameters.new(person: nil).require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty: person + # + # ActionController::Parameters.new(person: "\t").require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty: person + # + # ActionController::Parameters.new(person: {}).require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty: person + # + # When given an array of keys, the method tries to require each one of them + # in order. If it succeeds, an array with the respective return values is + # returned: + # + # params = ActionController::Parameters.new(user: { ... }, profile: { ... }) + # user_params, profile_params = params.require([:user, :profile]) + # + # Otherwise, the method re-raises the first exception found: + # + # params = ActionController::Parameters.new(user: {}, profile: {}) + # user_params, profile_params = params.require([:user, :profile]) + # # ActionController::ParameterMissing: param is missing or the value is empty: user + # + # Technically this method can be used to fetch terminal values: + # + # # CAREFUL + # params = ActionController::Parameters.new(person: { name: "Finn" }) + # name = params.require(:person).require(:name) # CAREFUL + # + # but take into account that at some point those ones have to be permitted: + # + # def person_params + # params.require(:person).permit(:name).tap do |person_params| + # person_params.require(:name) # SAFER + # end + # end + # + # for example. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#494 + def require(key); end + + # This method accepts both a single key and an array of keys. + # + # When passed a single key, if it exists and its associated value is + # either present or the singleton +false+, returns said value: + # + # ActionController::Parameters.new(person: { name: "Francesco" }).require(:person) + # # => #"Francesco"} permitted: false> + # + # Otherwise raises ActionController::ParameterMissing: + # + # ActionController::Parameters.new.require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty: person + # + # ActionController::Parameters.new(person: nil).require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty: person + # + # ActionController::Parameters.new(person: "\t").require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty: person + # + # ActionController::Parameters.new(person: {}).require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty: person + # + # When given an array of keys, the method tries to require each one of them + # in order. If it succeeds, an array with the respective return values is + # returned: + # + # params = ActionController::Parameters.new(user: { ... }, profile: { ... }) + # user_params, profile_params = params.require([:user, :profile]) + # + # Otherwise, the method re-raises the first exception found: + # + # params = ActionController::Parameters.new(user: {}, profile: {}) + # user_params, profile_params = params.require([:user, :profile]) + # # ActionController::ParameterMissing: param is missing or the value is empty: user + # + # Technically this method can be used to fetch terminal values: + # + # # CAREFUL + # params = ActionController::Parameters.new(person: { name: "Finn" }) + # name = params.require(:person).require(:name) # CAREFUL + # + # but take into account that at some point those ones have to be permitted: + # + # def person_params + # params.require(:person).permit(:name).tap do |person_params| + # person_params.require(:name) # SAFER + # end + # end + # + # for example. + # Alias of #require. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#494 + def required(key); end + + # Returns a new ActionController::Parameters with all keys from + # current hash merged into +other_hash+. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#863 + def reverse_merge(other_hash); end + + # Returns current ActionController::Parameters instance with + # current hash merged into +other_hash+. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#872 + def reverse_merge!(other_hash); end + + # Returns a new instance of ActionController::Parameters with only + # items that the block evaluates to true. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#794 + def select(&block); end + + # Equivalent to Hash#keep_if, but returns +nil+ if no changes were made. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#799 + def select!(&block); end + + # Returns a new ActionController::Parameters instance that + # includes only the given +keys+. If the given +keys+ + # don't exist, returns an empty hash. + # + # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) + # params.slice(:a, :b) # => #1, "b"=>2} permitted: false> + # params.slice(:d) # => # + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#699 + def slice(*keys); end + + # Returns current ActionController::Parameters instance which + # contains only the given +keys+. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#705 + def slice!(*keys); end + + # This is required by ActiveModel attribute assignment, so that user can + # pass +Parameters+ to a mass assignment methods in a model. It should not + # matter as we are using +HashWithIndifferentAccess+ internally. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#881 + def stringify_keys; end + + # Returns a safe ActiveSupport::HashWithIndifferentAccess + # representation of the parameters with all unpermitted keys removed. + # + # params = ActionController::Parameters.new({ + # name: "Senjougahara Hitagi", + # oddity: "Heavy stone crab" + # }) + # params.to_h + # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash + # + # safe_params = params.permit(:name) + # safe_params.to_h # => {"name"=>"Senjougahara Hitagi"} + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#305 + def to_h; end + + # Returns a safe Hash representation of the parameters + # with all unpermitted keys removed. + # + # params = ActionController::Parameters.new({ + # name: "Senjougahara Hitagi", + # oddity: "Heavy stone crab" + # }) + # params.to_hash + # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash + # + # safe_params = params.permit(:name) + # safe_params.to_hash # => {"name"=>"Senjougahara Hitagi"} + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#325 + def to_hash; end + + # Returns a string representation of the receiver suitable for use as a URL + # query string: + # + # params = ActionController::Parameters.new({ + # name: "David", + # nationality: "Danish" + # }) + # params.to_query + # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash + # + # safe_params = params.permit(:name, :nationality) + # safe_params.to_query + # # => "name=David&nationality=Danish" + # + # An optional namespace can be passed to enclose key names: + # + # params = ActionController::Parameters.new({ + # name: "David", + # nationality: "Danish" + # }) + # safe_params = params.permit(:name, :nationality) + # safe_params.to_query("user") + # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" + # + # The string pairs "key=value" that conform the query string + # are sorted lexicographically in ascending order. + # + # This method is also aliased as +to_param+. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#357 + def to_param(*args); end + + # Returns a string representation of the receiver suitable for use as a URL + # query string: + # + # params = ActionController::Parameters.new({ + # name: "David", + # nationality: "Danish" + # }) + # params.to_query + # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash + # + # safe_params = params.permit(:name, :nationality) + # safe_params.to_query + # # => "name=David&nationality=Danish" + # + # An optional namespace can be passed to enclose key names: + # + # params = ActionController::Parameters.new({ + # name: "David", + # nationality: "Danish" + # }) + # safe_params = params.permit(:name, :nationality) + # safe_params.to_query("user") + # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" + # + # The string pairs "key=value" that conform the query string + # are sorted lexicographically in ascending order. + # + # This method is also aliased as +to_param+. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#357 + def to_query(*args); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 + def to_s(*_arg0, **_arg1, &_arg2); end + + # Returns an unsafe, unfiltered + # ActiveSupport::HashWithIndifferentAccess representation of the + # parameters. + # + # params = ActionController::Parameters.new({ + # name: "Senjougahara Hitagi", + # oddity: "Heavy stone crab" + # }) + # params.to_unsafe_h + # # => {"name"=>"Senjougahara Hitagi", "oddity" => "Heavy stone crab"} + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#372 + def to_unsafe_h; end + + # Returns an unsafe, unfiltered + # ActiveSupport::HashWithIndifferentAccess representation of the + # parameters. + # + # params = ActionController::Parameters.new({ + # name: "Senjougahara Hitagi", + # oddity: "Heavy stone crab" + # }) + # params.to_unsafe_h + # # => {"name"=>"Senjougahara Hitagi", "oddity" => "Heavy stone crab"} + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#372 + def to_unsafe_hash; end + + # Returns a new ActionController::Parameters instance with the + # results of running +block+ once for every key. The values are unchanged. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#752 + def transform_keys(&block); end + + # Performs keys transformation and returns the altered + # ActionController::Parameters instance. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#761 + def transform_keys!(&block); end + + # Returns a new ActionController::Parameters with the results of + # running +block+ once for every value. The keys are unchanged. + # + # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) + # params.transform_values { |x| x * 2 } + # # => #2, "b"=>4, "c"=>6} permitted: false> + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#735 + def transform_values; end + + # Performs values transformation and returns the altered + # ActionController::Parameters instance. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#744 + def transform_values!; end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 + def value?(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#233 + def values(*_arg0, **_arg1, &_arg2); end + + # Returns values that were assigned to the given +keys+. Note that all the + # +Hash+ objects will be converted to ActionController::Parameters. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#842 + def values_at(*keys); end + + # Returns a new ActionController::Parameters with all keys from + # current hash merged into +other_hash+. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#863 + def with_defaults(other_hash); end + + # Returns current ActionController::Parameters instance with + # current hash merged into +other_hash+. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#872 + def with_defaults!(other_hash); end + + protected + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#936 + def each_nested_attribute; end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#932 + def nested_attributes?; end + + # Returns the value of attribute parameters. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#928 + def parameters; end + + # Sets the attribute permitted + # + # @param value the value to set the attribute permitted to. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#930 + def permitted=(_arg0); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1076 + def array_of_permitted_scalars?(value); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#964 + def convert_hashes_to_parameters(key, value); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#949 + def convert_parameters_to_hashes(value, using); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#970 + def convert_value_to_parameters(value); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#990 + def each_element(object, filter, &block); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1088 + def hash_filter(params, filter); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1147 + def initialize_copy(source); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#943 + def new_instance_with_inherited_permitted_status(hash); end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1082 + def non_scalar?(value); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1132 + def permit_any_in_array(array); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1115 + def permit_any_in_parameters(params); end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1047 + def permitted_scalar?(value); end + + # Adds existing keys to the params if their values are scalar. + # + # For example: + # + # puts self.keys #=> ["zipcode(90210i)"] + # params = {} + # + # permitted_scalar_filter(params, "zipcode") + # + # puts params.keys # => ["zipcode"] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1061 + def permitted_scalar_filter(params, permitted_key); end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#984 + def specify_numeric_keys?(filter); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1016 + def unpermitted_keys(params); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1003 + def unpermitted_parameters!(params); end + + class << self + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#135 + def action_on_unpermitted_parameters; end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#135 + def action_on_unpermitted_parameters=(val); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#243 + def always_permitted_parameters; end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#243 + def always_permitted_parameters=(val); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#889 + def hook_into_yaml_loading; end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#246 + def nested_attribute?(key, value); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#133 + def permit_all_parameters; end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#133 + def permit_all_parameters=(val); end + end +end + +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1086 +ActionController::Parameters::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1087 +ActionController::Parameters::EMPTY_HASH = T.let(T.unsafe(nil), Hash) + +# This is a list of permitted scalar types that includes the ones +# supported in XML and JSON requests. +# +# This list is in particular used to filter ordinary requests, String goes +# as first element to quickly short-circuit the common case. +# +# If you modify this collection please update the API of +permit+ above. +# +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1031 +ActionController::Parameters::PERMITTED_SCALAR_TYPES = T.let(T.unsafe(nil), Array) + +# Wraps the parameters hash into a nested hash. This will allow clients to +# submit requests without having to specify any root elements. +# +# This functionality is enabled by default for JSON, and can be customized by +# setting the format array: +# +# class ApplicationController < ActionController::Base +# wrap_parameters format: [:json, :xml] +# end +# +# You could also turn it on per controller: +# +# class UsersController < ApplicationController +# wrap_parameters format: [:json, :xml, :url_encoded_form, :multipart_form] +# end +# +# If you enable +ParamsWrapper+ for +:json+ format, instead of having to +# send JSON parameters like this: +# +# {"user": {"name": "Konata"}} +# +# You can send parameters like this: +# +# {"name": "Konata"} +# +# And it will be wrapped into a nested hash with the key name matching the +# controller's name. For example, if you're posting to +UsersController+, +# your new +params+ hash will look like this: +# +# {"name" => "Konata", "user" => {"name" => "Konata"}} +# +# You can also specify the key in which the parameters should be wrapped to, +# and also the list of attributes it should wrap by using either +:include+ or +# +:exclude+ options like this: +# +# class UsersController < ApplicationController +# wrap_parameters :person, include: [:username, :password] +# end +# +# On Active Record models with no +:include+ or +:exclude+ option set, +# it will only wrap the parameters returned by the class method +# attribute_names. +# +# If you're going to pass the parameters to an +ActiveModel+ object (such as +# User.new(params[:user])), you might consider passing the model class to +# the method instead. The +ParamsWrapper+ will actually try to determine the +# list of attribute names from the model and only wrap those attributes: +# +# class UsersController < ApplicationController +# wrap_parameters Person +# end +# +# You still could pass +:include+ and +:exclude+ to set the list of attributes +# you want to wrap. +# +# By default, if you don't specify the key in which the parameters would be +# wrapped to, +ParamsWrapper+ will actually try to determine if there's +# a model related to it or not. This controller, for example: +# +# class Admin::UsersController < ApplicationController +# end +# +# will try to check if Admin::User or +User+ model exists, and use it to +# determine the wrapper key respectively. If both models don't exist, +# it will then fallback to use +user+ as the key. +# +# To disable this functionality for a controller: +# +# class UsersController < ApplicationController +# wrap_parameters false +# end +# +# source://actionpack//lib/action_controller/metal/params_wrapper.rb#80 +module ActionController::ParamsWrapper + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionController::ParamsWrapper::ClassMethods + + private + + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#277 + def _extract_parameters(parameters); end + + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#299 + def _perform_parameter_wrapping; end + + # Returns the list of parameters which will be selected for wrapped. + # + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#273 + def _wrap_parameters(parameters); end + + # Checks if we should perform parameters wrapping. + # + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#289 + def _wrapper_enabled?; end + + # Returns the list of enabled formats. + # + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#268 + def _wrapper_formats; end + + # Returns the wrapper key which will be used to store wrapped parameters. + # + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#263 + def _wrapper_key; end + + # Performs parameters wrapping upon the request. Called automatically + # by the metal call stack. + # + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#257 + def process_action(*_arg0); end + + module GeneratedClassMethods + def _wrapper_options; end + def _wrapper_options=(value); end + def _wrapper_options?; end + end + + module GeneratedInstanceMethods + def _wrapper_options; end + def _wrapper_options=(value); end + def _wrapper_options?; end + end +end + +# source://actionpack//lib/action_controller/metal/params_wrapper.rb#188 +module ActionController::ParamsWrapper::ClassMethods + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#189 + def _set_wrapper_options(options); end + + # Sets the default wrapper key or model which will be used to determine + # wrapper key and attribute names. Called automatically when the + # module is inherited. + # + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#244 + def inherited(klass); end + + # Sets the name of the wrapper key, or the model which +ParamsWrapper+ + # would use to determine the attribute names from. + # + # ==== Examples + # wrap_parameters format: :xml + # # enables the parameter wrapper for XML format + # + # wrap_parameters :person + # # wraps parameters into +params[:person]+ hash + # + # wrap_parameters Person + # # wraps parameters by determining the wrapper key from Person class + # # (+person+, in this case) and the list of attribute names + # + # wrap_parameters include: [:username, :title] + # # wraps only +:username+ and +:title+ attributes from parameters. + # + # wrap_parameters false + # # disables parameters wrapping for this controller altogether. + # + # ==== Options + # * :format - The list of formats in which the parameters wrapper + # will be enabled. + # * :include - The list of attribute names which parameters wrapper + # will wrap into a nested hash. + # * :exclude - The list of attribute names which parameters wrapper + # will exclude from a nested hash. + # + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#220 + def wrap_parameters(name_or_model_or_options, options = T.unsafe(nil)); end +end + +# source://actionpack//lib/action_controller/metal/params_wrapper.rb#83 +ActionController::ParamsWrapper::EXCLUDE_PARAMETERS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_controller/metal/params_wrapper.rb#87 +class ActionController::ParamsWrapper::Options < ::Struct + include ::Mutex_m + + # @return [Options] a new instance of Options + # + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#98 + def initialize(name, format, include, exclude, klass, model); end + + # Returns the value of attribute include + # + # @return [Object] the current value of include + # + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#108 + def include; end + + # source://mutex_m/0.1.1/mutex_m.rb#93 + def lock; end + + # source://mutex_m/0.1.1/mutex_m.rb#83 + def locked?; end + + # Returns the value of attribute model + # + # @return [Object] the current value of model + # + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#104 + def model; end + + # Returns the value of attribute name + # + # @return [Object] the current value of name + # + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#141 + def name; end + + # source://mutex_m/0.1.1/mutex_m.rb#78 + def synchronize(&block); end + + # source://mutex_m/0.1.1/mutex_m.rb#88 + def try_lock; end + + # source://mutex_m/0.1.1/mutex_m.rb#98 + def unlock; end + + private + + # Determine the wrapper model from the controller's name. By convention, + # this could be done by trying to find the defined model that has the + # same singular name as the controller. For example, +UsersController+ + # will try to find if the +User+ model exists. + # + # This method also does namespace lookup. Foo::Bar::UsersController will + # try to find Foo::Bar::User, Foo::User and finally User. + # + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#165 + def _default_wrap_model; end + + class << self + # source://actionpack//lib/action_controller/metal/params_wrapper.rb#90 + def from_hash(hash); end + end +end + +# source://actionpack//lib/action_controller/metal/permissions_policy.rb#4 +module ActionController::PermissionsPolicy + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::PermissionsPolicy::ClassMethods +end + +# source://actionpack//lib/action_controller/metal/permissions_policy.rb#7 +module ActionController::PermissionsPolicy::ClassMethods + # Overrides parts of the globally configured Feature-Policy + # header: + # + # class PagesController < ApplicationController + # permissions_policy do |policy| + # policy.geolocation "https://example.com" + # end + # end + # + # Options can be passed similar to +before_action+. For example, pass + # only: :index to override the header on the index action only: + # + # class PagesController < ApplicationController + # permissions_policy(only: :index) do |policy| + # policy.camera :self + # end + # end + # + # source://actionpack//lib/action_controller/metal/permissions_policy.rb#26 + def permissions_policy(**options, &block); end +end + +# source://actionpack//lib/action_controller/metal/redirecting.rb#4 +module ActionController::Redirecting + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActiveSupport::Benchmarkable + include ::AbstractController::Logger + include ::ActionDispatch::Routing::UrlFor + include ::AbstractController::UrlFor + include ::ActionController::UrlFor + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::UrlFor::ClassMethods + + # source://actionpack//lib/action_controller/metal/redirecting.rb#130 + def _compute_redirect_to_location(request, options); end + + # Soft deprecated alias for #redirect_back_or_to where the +fallback_location+ location is supplied as a keyword argument instead + # of the first positional argument. + # + # source://actionpack//lib/action_controller/metal/redirecting.rb#95 + def redirect_back(fallback_location:, allow_other_host: T.unsafe(nil), **args); end + + # Redirects the browser to the page that issued the request (the referrer) + # if possible, otherwise redirects to the provided default fallback + # location. + # + # The referrer information is pulled from the HTTP +Referer+ (sic) header on + # the request. This is an optional header and its presence on the request is + # subject to browser security settings and user preferences. If the request + # is missing this header, the fallback_location will be used. + # + # redirect_back_or_to({ action: "show", id: 5 }) + # redirect_back_or_to @post + # redirect_back_or_to "http://www.rubyonrails.org" + # redirect_back_or_to "/images/screenshot.jpg" + # redirect_back_or_to posts_url + # redirect_back_or_to proc { edit_post_url(@post) } + # redirect_back_or_to '/', allow_other_host: false + # + # ==== Options + # * :allow_other_host - Allow or disallow redirection to the host that is different to the current host, defaults to true. + # + # All other options that can be passed to #redirect_to are accepted as + # options, and the behavior is identical. + # + # source://actionpack//lib/action_controller/metal/redirecting.rb#121 + def redirect_back_or_to(fallback_location, allow_other_host: T.unsafe(nil), **options); end + + # Redirects the browser to the target specified in +options+. This parameter can be any one of: + # + # * Hash - The URL will be generated by calling url_for with the +options+. + # * Record - The URL will be generated by calling url_for with the +options+, which will reference a named URL for that record. + # * String starting with protocol:// (like http://) or a protocol relative reference (like //) - Is passed straight through as the target for redirection. + # * String not containing a protocol - The current protocol and host is prepended to the string. + # * Proc - A block that will be executed in the controller's context. Should return any option accepted by +redirect_to+. + # + # === Examples: + # + # redirect_to action: "show", id: 5 + # redirect_to @post + # redirect_to "http://www.rubyonrails.org" + # redirect_to "/images/screenshot.jpg" + # redirect_to posts_url + # redirect_to proc { edit_post_url(@post) } + # + # The redirection happens as a 302 Found header unless otherwise specified using the :status option: + # + # redirect_to post_url(@post), status: :found + # redirect_to action: 'atom', status: :moved_permanently + # redirect_to post_url(@post), status: 301 + # redirect_to action: 'atom', status: 302 + # + # The status code can either be a standard {HTTP Status code}[https://www.iana.org/assignments/http-status-codes] as an + # integer, or a symbol representing the downcased, underscored and symbolized description. + # Note that the status code must be a 3xx HTTP code, or redirection will not occur. + # + # If you are using XHR requests other than GET or POST and redirecting after the + # request then some browsers will follow the redirect using the original request + # method. This may lead to undesirable behavior such as a double DELETE. To work + # around this you can return a 303 See Other status code which will be + # followed using a GET request. + # + # redirect_to posts_url, status: :see_other + # redirect_to action: 'index', status: 303 + # + # It is also possible to assign a flash message as part of the redirection. There are two special accessors for the commonly used flash names + # +alert+ and +notice+ as well as a general purpose +flash+ bucket. + # + # redirect_to post_url(@post), alert: "Watch it, mister!" + # redirect_to post_url(@post), status: :found, notice: "Pay attention to the road" + # redirect_to post_url(@post), status: 301, flash: { updated_post_id: @post.id } + # redirect_to({ action: 'atom' }, alert: "Something serious happened") + # + # Statements after +redirect_to+ in our controller get executed, so +redirect_to+ doesn't stop the execution of the function. + # To terminate the execution of the function immediately after the +redirect_to+, use return. + # + # redirect_to post_url(@post) and return + # + # === Open Redirect protection + # + # By default, Rails protects against redirecting to external hosts for your app's safety, so called open redirects. + # Note: this was a new default in Rails 7.0, after upgrading opt-in by uncommenting the line with +raise_on_open_redirects+ in config/initializers/new_framework_defaults_7_0.rb + # + # Here #redirect_to automatically validates the potentially-unsafe URL: + # + # redirect_to params[:redirect_url] + # + # Raises UnsafeRedirectError in the case of an unsafe redirect. + # + # To allow any external redirects pass allow_other_host: true, though using a user-provided param in that case is unsafe. + # + # redirect_to "https://rubyonrails.org", allow_other_host: true + # + # See #url_from for more information on what an internal and safe URL is, or how to fall back to an alternate redirect URL in the unsafe case. + # + # @raise [ActionControllerError] + # + # source://actionpack//lib/action_controller/metal/redirecting.rb#82 + def redirect_to(options = T.unsafe(nil), response_options = T.unsafe(nil)); end + + # Verifies the passed +location+ is an internal URL that's safe to redirect to and returns it, or nil if not. + # Useful to wrap a params provided redirect URL and fallback to an alternate URL to redirect to: + # + # redirect_to url_from(params[:redirect_url]) || root_url + # + # The +location+ is considered internal, and safe, if it's on the same host as request.host: + # + # # If request.host is example.com: + # url_from("https://example.com/profile") # => "https://example.com/profile" + # url_from("http://example.com/profile") # => "http://example.com/profile" + # url_from("http://evil.com/profile") # => nil + # + # Subdomains are considered part of the host: + # + # # If request.host is on https://example.com or https://app.example.com, you'd get: + # url_from("https://dev.example.com/profile") # => nil + # + # NOTE: there's a similarity with {url_for}[rdoc-ref:ActionDispatch::Routing::UrlFor#url_for], which generates an internal URL from various options from within the app, e.g. url_for(@post). + # However, #url_from is meant to take an external parameter to verify as in url_from(params[:redirect_url]). + # + # source://actionpack//lib/action_controller/metal/redirecting.rb#169 + def url_from(location); end + + private + + # source://actionpack//lib/action_controller/metal/redirecting.rb#175 + def _allow_other_host; end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#189 + def _enforce_open_redirect_protection(location, allow_other_host:); end + + # source://actionpack//lib/action_controller/metal/redirecting.rb#179 + def _extract_redirect_to_status(options, response_options); end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/metal/redirecting.rb#197 + def _url_host_allowed?(url); end + + class << self + # source://actionpack//lib/action_controller/metal/redirecting.rb#130 + def _compute_redirect_to_location(request, options); end + end + + module GeneratedClassMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end + + module GeneratedInstanceMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end +end + +# source://actionpack//lib/action_controller/metal/redirecting.rb#10 +class ActionController::Redirecting::UnsafeRedirectError < ::StandardError; end + +# source://actionpack//lib/action_controller/metal/exceptions.rb#14 +class ActionController::RenderError < ::ActionController::ActionControllerError; end + +# ActionController::Renderer allows you to render arbitrary templates +# without requirement of being in controller actions. +# +# You get a concrete renderer class by invoking ActionController::Base#renderer. +# For example: +# +# ApplicationController.renderer +# +# It allows you to call method #render directly. +# +# ApplicationController.renderer.render template: '...' +# +# You can use this shortcut in a controller, instead of the previous example: +# +# ApplicationController.render template: '...' +# +# #render allows you to use the same options that you can use when rendering in a controller. +# For example: +# +# FooController.render :action, locals: { ... }, assigns: { ... } +# +# The template will be rendered in a Rack environment which is accessible through +# ActionController::Renderer#env. You can set it up in two ways: +# +# * by changing renderer defaults, like +# +# ApplicationController.renderer.defaults # => hash with default Rack environment +# +# * by initializing an instance of renderer by passing it a custom environment. +# +# ApplicationController.renderer.new(method: 'post', https: true) +# +# source://actionpack//lib/action_controller/renderer.rb#36 +class ActionController::Renderer + # Accepts a custom Rack environment to render templates in. + # It will be merged with the default Rack environment defined by + # +ActionController::Renderer::DEFAULTS+. + # + # @return [Renderer] a new instance of Renderer + # + # source://actionpack//lib/action_controller/renderer.rb#65 + def initialize(controller, env, defaults); end + + # Returns the value of attribute controller. + # + # source://actionpack//lib/action_controller/renderer.rb#37 + def controller; end + + # Returns the value of attribute defaults. + # + # source://actionpack//lib/action_controller/renderer.rb#37 + def defaults; end + + # Create a new renderer for the same controller but with a new env. + # + # source://actionpack//lib/action_controller/renderer.rb#53 + def new(env = T.unsafe(nil)); end + + # Render templates with any options from ActionController::Base#render_to_string. + # + # The primary options are: + # * :partial - See ActionView::PartialRenderer for details. + # * :file - Renders an explicit template file. Add :locals to pass in, if so desired. + # It shouldn’t be used directly with unsanitized user input due to lack of validation. + # * :inline - Renders an ERB template string. + # * :plain - Renders provided text and sets the content type as text/plain. + # * :html - Renders the provided HTML safe string, otherwise + # performs HTML escape on the string first. Sets the content type as text/html. + # * :json - Renders the provided hash or object in JSON. You don't + # need to call .to_json on the object you want to render. + # * :body - Renders provided text and sets content type of text/plain. + # + # If no options hash is passed or if :update is specified, then: + # + # If an object responding to +render_in+ is passed, +render_in+ is called on the object, + # passing in the current view context. + # + # Otherwise, a partial is rendered using the second parameter as the locals hash. + # + # source://actionpack//lib/action_controller/renderer.rb#91 + def render(*args); end + + # Render templates with any options from ActionController::Base#render_to_string. + # + # The primary options are: + # * :partial - See ActionView::PartialRenderer for details. + # * :file - Renders an explicit template file. Add :locals to pass in, if so desired. + # It shouldn’t be used directly with unsanitized user input due to lack of validation. + # * :inline - Renders an ERB template string. + # * :plain - Renders provided text and sets the content type as text/plain. + # * :html - Renders the provided HTML safe string, otherwise + # performs HTML escape on the string first. Sets the content type as text/html. + # * :json - Renders the provided hash or object in JSON. You don't + # need to call .to_json on the object you want to render. + # * :body - Renders provided text and sets content type of text/plain. + # + # If no options hash is passed or if :update is specified, then: + # + # If an object responding to +render_in+ is passed, +render_in+ is called on the object, + # passing in the current view context. + # + # Otherwise, a partial is rendered using the second parameter as the locals hash. + # + # source://actionpack//lib/action_controller/renderer.rb#91 + def render_to_string(*args); end + + # Create a new renderer for the same controller but with new defaults. + # + # source://actionpack//lib/action_controller/renderer.rb#58 + def with_defaults(defaults); end + + private + + # source://actionpack//lib/action_controller/renderer.rb#105 + def normalize_keys(defaults, env); end + + # source://actionpack//lib/action_controller/renderer.rb#126 + def rack_key_for(key); end + + # source://actionpack//lib/action_controller/renderer.rb#130 + def rack_value_for(key, value); end + + class << self + # Create a new renderer instance for a specific controller class. + # + # source://actionpack//lib/action_controller/renderer.rb#48 + def for(controller, env = T.unsafe(nil), defaults = T.unsafe(nil)); end + end +end + +# source://actionpack//lib/action_controller/renderer.rb#39 +ActionController::Renderer::DEFAULTS = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_controller/renderer.rb#118 +ActionController::Renderer::RACK_KEY_TRANSLATION = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_controller/metal/renderers.rb#23 +module ActionController::Renderers + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionController::Renderers::ClassMethods + + # source://actionpack//lib/action_controller/metal/renderers.rb#144 + def _render_to_body_with_renderer(options); end + + # source://actionpack//lib/action_controller/metal/renderers.rb#170 + def _render_with_renderer_js(js, options); end + + # source://actionpack//lib/action_controller/metal/renderers.rb#155 + def _render_with_renderer_json(json, options); end + + # source://actionpack//lib/action_controller/metal/renderers.rb#175 + def _render_with_renderer_xml(xml, options); end + + # Called by +render+ in AbstractController::Rendering + # which sets the return value as the +response_body+. + # + # If no renderer is found, +super+ returns control to + # ActionView::Rendering.render_to_body, if present. + # + # source://actionpack//lib/action_controller/metal/renderers.rb#140 + def render_to_body(options); end + + class << self + # source://actionpack//lib/action_controller/metal/renderers.rb#90 + def _render_with_renderer_method_name(key); end + + # Adds a new renderer to call within controller actions. + # A renderer is invoked by passing its name as an option to + # AbstractController::Rendering#render. To create a renderer + # pass it a name and a block. The block takes two arguments, the first + # is the value paired with its key and the second is the remaining + # hash of options passed to +render+. + # + # Create a csv renderer: + # + # ActionController::Renderers.add :csv do |obj, options| + # filename = options[:filename] || 'data' + # str = obj.respond_to?(:to_csv) ? obj.to_csv : obj.to_s + # send_data str, type: Mime[:csv], + # disposition: "attachment; filename=#{filename}.csv" + # end + # + # Note that we used Mime[:csv] for the csv mime type as it comes with Rails. + # For a custom renderer, you'll need to register a mime type with + # Mime::Type.register. + # + # To use the csv renderer in a controller action: + # + # def show + # @csvable = Csvable.find(params[:id]) + # respond_to do |format| + # format.html + # format.csv { render csv: @csvable, filename: @csvable.name } + # end + # end + # + # source://actionpack//lib/action_controller/metal/renderers.rb#74 + def add(key, &block); end + + # This method is the opposite of add method. + # + # To remove a csv renderer: + # + # ActionController::Renderers.remove(:csv) + # + # source://actionpack//lib/action_controller/metal/renderers.rb#84 + def remove(key); end + end + + module GeneratedClassMethods + def _renderers; end + def _renderers=(value); end + def _renderers?; end + end + + module GeneratedInstanceMethods + def _renderers; end + def _renderers=(value); end + def _renderers?; end + end +end + +# Used in ActionController::Base and ActionController::API to include all +# renderers by default. +# +# source://actionpack//lib/action_controller/metal/renderers.rb#36 +module ActionController::Renderers::All + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActionController::Renderers + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionController::Renderers::ClassMethods + + module GeneratedClassMethods + def _renderers; end + def _renderers=(value); end + def _renderers?; end + end + + module GeneratedInstanceMethods + def _renderers; end + def _renderers=(value); end + def _renderers?; end + end +end + +# source://actionpack//lib/action_controller/metal/renderers.rb#94 +module ActionController::Renderers::ClassMethods + # Adds, by name, a renderer or renderers to the +_renderers+ available + # to call within controller actions. + # + # It is useful when rendering from an ActionController::Metal controller or + # otherwise to add an available renderer proc to a specific controller. + # + # Both ActionController::Base and ActionController::API + # include ActionController::Renderers::All, making all renderers + # available in the controller. See Renderers::RENDERERS and Renderers.add. + # + # Since ActionController::Metal controllers cannot render, the controller + # must include AbstractController::Rendering, ActionController::Rendering, + # and ActionController::Renderers, and have at least one renderer. + # + # Rather than including ActionController::Renderers::All and including all renderers, + # you may specify which renderers to include by passing the renderer name or names to + # +use_renderers+. For example, a controller that includes only the :json renderer + # (+_render_with_renderer_json+) might look like: + # + # class MetalRenderingController < ActionController::Metal + # include AbstractController::Rendering + # include ActionController::Rendering + # include ActionController::Renderers + # + # use_renderers :json + # + # def show + # render json: record + # end + # end + # + # You must specify a +use_renderer+, else the +controller.renderer+ and + # +controller._renderers+ will be nil, and the action will fail. + # + # source://actionpack//lib/action_controller/metal/renderers.rb#128 + def use_renderer(*args); end + + # Adds, by name, a renderer or renderers to the +_renderers+ available + # to call within controller actions. + # + # It is useful when rendering from an ActionController::Metal controller or + # otherwise to add an available renderer proc to a specific controller. + # + # Both ActionController::Base and ActionController::API + # include ActionController::Renderers::All, making all renderers + # available in the controller. See Renderers::RENDERERS and Renderers.add. + # + # Since ActionController::Metal controllers cannot render, the controller + # must include AbstractController::Rendering, ActionController::Rendering, + # and ActionController::Renderers, and have at least one renderer. + # + # Rather than including ActionController::Renderers::All and including all renderers, + # you may specify which renderers to include by passing the renderer name or names to + # +use_renderers+. For example, a controller that includes only the :json renderer + # (+_render_with_renderer_json+) might look like: + # + # class MetalRenderingController < ActionController::Metal + # include AbstractController::Rendering + # include ActionController::Rendering + # include ActionController::Renderers + # + # use_renderers :json + # + # def show + # render json: record + # end + # end + # + # You must specify a +use_renderer+, else the +controller.renderer+ and + # +controller._renderers+ will be nil, and the action will fail. + # + # source://actionpack//lib/action_controller/metal/renderers.rb#128 + def use_renderers(*args); end +end + +# A Set containing renderer names that correspond to available renderer procs. +# Default values are :json, :js, :xml. +# +# source://actionpack//lib/action_controller/metal/renderers.rb#28 +ActionController::Renderers::RENDERERS = T.let(T.unsafe(nil), Set) + +# source://actionpack//lib/action_controller/metal/rendering.rb#4 +module ActionController::Rendering + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::Rendering::ClassMethods + + # Check for double render errors and set the content_type after rendering. + # + # @raise [::AbstractController::DoubleRenderError] + # + # source://actionpack//lib/action_controller/metal/rendering.rb#28 + def render(*args); end + + # source://actionpack//lib/action_controller/metal/rendering.rb#45 + def render_to_body(options = T.unsafe(nil)); end + + # Override render_to_string because body can now be set to a Rack body. + # + # source://actionpack//lib/action_controller/metal/rendering.rb#34 + def render_to_string(*_arg0); end + + private + + # Normalize arguments by catching blocks and setting them on :update. + # + # source://actionpack//lib/action_controller/metal/rendering.rb#87 + def _normalize_args(action = T.unsafe(nil), options = T.unsafe(nil), &blk); end + + # Normalize both text and status options. + # + # source://actionpack//lib/action_controller/metal/rendering.rb#94 + def _normalize_options(options); end + + # source://actionpack//lib/action_controller/metal/rendering.rb#108 + def _normalize_text(options); end + + # Process controller specific options, as status, content-type and location. + # + # source://actionpack//lib/action_controller/metal/rendering.rb#117 + def _process_options(options); end + + # source://actionpack//lib/action_controller/metal/rendering.rb#56 + def _process_variant(options); end + + # source://actionpack//lib/action_controller/metal/rendering.rb#62 + def _render_in_priorities(options); end + + # source://actionpack//lib/action_controller/metal/rendering.rb#70 + def _set_html_content_type; end + + # source://actionpack//lib/action_controller/metal/rendering.rb#74 + def _set_rendered_content_type(format); end + + # source://actionpack//lib/action_controller/metal/rendering.rb#80 + def _set_vary_header; end + + # Before processing, set the request formats in current controller formats. + # + # source://actionpack//lib/action_controller/metal/rendering.rb#51 + def process_action(*_arg0); end +end + +# source://actionpack//lib/action_controller/metal/rendering.rb#9 +module ActionController::Rendering::ClassMethods + # source://actionpack//lib/action_controller/metal/rendering.rb#21 + def inherited(klass); end + + # source://actionpack//lib/action_controller/metal/rendering.rb#11 + def render(*_arg0, **_arg1, &_arg2); end + + # Returns a renderer instance (inherited from ActionController::Renderer) + # for the controller. + # + # source://actionpack//lib/action_controller/metal/rendering.rb#15 + def renderer; end + + # source://actionpack//lib/action_controller/metal/rendering.rb#17 + def setup_renderer!; end +end + +# source://actionpack//lib/action_controller/metal/rendering.rb#7 +ActionController::Rendering::RENDER_FORMATS_IN_PRIORITY = T.let(T.unsafe(nil), Array) + +# Controller actions are protected from Cross-Site Request Forgery (CSRF) attacks +# by including a token in the rendered HTML for your application. This token is +# stored as a random string in the session, to which an attacker does not have +# access. When a request reaches your application, \Rails verifies the received +# token with the token in the session. All requests are checked except GET requests +# as these should be idempotent. Keep in mind that all session-oriented requests +# are CSRF protected by default, including JavaScript and HTML requests. +# +# Since HTML and JavaScript requests are typically made from the browser, we +# need to ensure to verify request authenticity for the web browser. We can +# use session-oriented authentication for these types of requests, by using +# the protect_from_forgery method in our controllers. +# +# GET requests are not protected since they don't have side effects like writing +# to the database and don't leak sensitive information. JavaScript requests are +# an exception: a third-party site can use a +# +# The first two characters (">) are required in case the exception happens +# while rendering attributes for a given tag. You can check the real cause +# for the exception in your logger. +# +# == Web server support +# +# Not all web servers support streaming out-of-the-box. You need to check +# the instructions for each of them. +# +# ==== Unicorn +# +# Unicorn supports streaming but it needs to be configured. For this, you +# need to create a config file as follow: +# +# # unicorn.config.rb +# listen 3000, tcp_nopush: false +# +# And use it on initialization: +# +# unicorn_rails --config-file unicorn.config.rb +# +# You may also want to configure other parameters like :tcp_nodelay. +# Please check its documentation for more information: https://bogomips.org/unicorn/Unicorn/Configurator.html#method-i-listen +# +# If you are using Unicorn with NGINX, you may need to tweak NGINX. +# Streaming should work out of the box on Rainbows. +# +# ==== Passenger +# +# To be described. +# +# source://actionpack//lib/action_controller/metal/streaming.rb#195 +module ActionController::Streaming + private + + # Set proper cache control and transfer encoding when streaming + # + # source://actionpack//lib/action_controller/metal/streaming.rb#198 + def _process_options(options); end + + # Call render_body if we are streaming instead of usual +render+. + # + # source://actionpack//lib/action_controller/metal/streaming.rb#212 + def _render_template(options); end +end + +# == Strong \Parameters +# +# It provides an interface for protecting attributes from end-user +# assignment. This makes Action Controller parameters forbidden +# to be used in Active Model mass assignment until they have been explicitly +# enumerated. +# +# In addition, parameters can be marked as required and flow through a +# predefined raise/rescue flow to end up as a 400 Bad Request with no +# effort. +# +# class PeopleController < ActionController::Base +# # Using "Person.create(params[:person])" would raise an +# # ActiveModel::ForbiddenAttributesError exception because it'd +# # be using mass assignment without an explicit permit step. +# # This is the recommended form: +# def create +# Person.create(person_params) +# end +# +# # This will pass with flying colors as long as there's a person key in the +# # parameters, otherwise it'll raise an ActionController::ParameterMissing +# # exception, which will get caught by ActionController::Base and turned +# # into a 400 Bad Request reply. +# def update +# redirect_to current_account.people.find(params[:id]).tap { |person| +# person.update!(person_params) +# } +# end +# +# private +# # Using a private method to encapsulate the permissible parameters is +# # a good pattern since you'll be able to reuse the same permit +# # list between create and update. Also, you can specialize this method +# # with per-user checking of permissible attributes. +# def person_params +# params.require(:person).permit(:name, :age) +# end +# end +# +# In order to use accepts_nested_attributes_for with Strong \Parameters, you +# will need to specify which nested attributes should be permitted. You might want +# to allow +:id+ and +:_destroy+, see ActiveRecord::NestedAttributes for more information. +# +# class Person +# has_many :pets +# accepts_nested_attributes_for :pets +# end +# +# class PeopleController < ActionController::Base +# def create +# Person.create(person_params) +# end +# +# ... +# +# private +# +# def person_params +# # It's mandatory to specify the nested attributes that should be permitted. +# # If you use `permit` with just the key that points to the nested attributes hash, +# # it will return an empty hash. +# params.require(:person).permit(:name, :age, pets_attributes: [ :id, :name, :category ]) +# end +# end +# +# See ActionController::Parameters.require and ActionController::Parameters.permit +# for more information. +# +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#1221 +module ActionController::StrongParameters + # Returns a new ActionController::Parameters object that + # has been instantiated with the request.parameters. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1224 + def params; end + + # Assigns the given +value+ to the +params+ hash. If +value+ + # is a Hash, this will create an ActionController::Parameters + # object that has been instantiated with the given +value+ hash. + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#1239 + def params=(value); end +end + +# source://actionpack//lib/action_controller/template_assertions.rb#4 +module ActionController::TemplateAssertions + # @raise [NoMethodError] + # + # source://actionpack//lib/action_controller/template_assertions.rb#5 + def assert_template(options = T.unsafe(nil), message = T.unsafe(nil)); end +end + +# Superclass for ActionController functional tests. Functional tests allow you to +# test a single controller action per test method. +# +# == Use integration style controller tests over functional style controller tests. +# +# Rails discourages the use of functional tests in favor of integration tests +# (use ActionDispatch::IntegrationTest). +# +# New Rails applications no longer generate functional style controller tests and they should +# only be used for backward compatibility. Integration style controller tests perform actual +# requests, whereas functional style controller tests merely simulate a request. Besides, +# integration tests are as fast as functional tests and provide lot of helpers such as +as+, +# +parsed_body+ for effective testing of controller actions including even API endpoints. +# +# == Basic example +# +# Functional tests are written as follows: +# 1. First, one uses the +get+, +post+, +patch+, +put+, +delete+, or +head+ method to simulate +# an HTTP request. +# 2. Then, one asserts whether the current state is as expected. "State" can be anything: +# the controller's HTTP response, the database contents, etc. +# +# For example: +# +# class BooksControllerTest < ActionController::TestCase +# def test_create +# # Simulate a POST response with the given HTTP parameters. +# post(:create, params: { book: { title: "Love Hina" }}) +# +# # Asserts that the controller tried to redirect us to +# # the created book's URI. +# assert_response :found +# +# # Asserts that the controller really put the book in the database. +# assert_not_nil Book.find_by(title: "Love Hina") +# end +# end +# +# You can also send a real document in the simulated HTTP request. +# +# def test_create +# json = {book: { title: "Love Hina" }}.to_json +# post :create, body: json +# end +# +# == Special instance variables +# +# ActionController::TestCase will also automatically provide the following instance +# variables for use in the tests: +# +# @controller:: +# The controller instance that will be tested. +# @request:: +# An ActionController::TestRequest, representing the current HTTP +# request. You can modify this object before sending the HTTP request. For example, +# you might want to set some session properties before sending a GET request. +# @response:: +# An ActionDispatch::TestResponse object, representing the response +# of the last HTTP response. In the above example, @response becomes valid +# after calling +post+. If the various assert methods are not sufficient, then you +# may use this object to inspect the HTTP response in detail. +# +# == Controller is automatically inferred +# +# ActionController::TestCase will automatically infer the controller under test +# from the test class name. If the controller cannot be inferred from the test +# class name, you can explicitly set it with +tests+. +# +# class SpecialEdgeCaseWidgetsControllerTest < ActionController::TestCase +# tests WidgetController +# end +# +# == \Testing controller internals +# +# In addition to these specific assertions, you also have easy access to various collections that the regular test/unit assertions +# can be used against. These collections are: +# +# * session: Objects being saved in the session. +# * flash: The flash objects currently in the session. +# * cookies: \Cookies being sent to the user on this request. +# +# These collections can be used just like any other hash: +# +# assert_equal "Dave", cookies[:name] # makes sure that a cookie called :name was set as "Dave" +# assert flash.empty? # makes sure that there's nothing in the flash +# +# On top of the collections, you have the complete URL that a given action redirected to available in redirect_to_url. +# +# For redirects within the same controller, you can even call follow_redirect and the redirect will be followed, triggering another +# action call which can then be asserted against. +# +# == Manipulating session and cookie variables +# +# Sometimes you need to set up the session and cookie variables for a test. +# To do this just assign a value to the session or cookie collection: +# +# session[:key] = "value" +# cookies[:key] = "value" +# +# To clear the cookies for a test just clear the cookie collection: +# +# cookies.clear +# +# == \Testing named routes +# +# If you're using named routes, they can be easily tested using the original named routes' methods straight in the test case. +# +# assert_redirected_to page_url(title: 'foo') +# +# source://actionpack//lib/action_controller/test_case.rb#335 +class ActionController::TestCase < ::ActiveSupport::TestCase + include ::ActiveSupport::Testing::ConstantLookup + include ::ActionDispatch::Assertions::ResponseAssertions + include ::ActionDispatch::Assertions::RoutingAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::ActionDispatch::TestProcess::FixtureFile + include ::ActionDispatch::TestProcess + include ::ActionController::TestCase::Behavior + include ::ActionController::TemplateAssertions + include ::ActionDispatch::Assertions + extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods + extend ::ActionController::TestCase::Behavior::ClassMethods + + # source://actionpack//lib/action_controller/test_case.rb#561 + def _controller_class; end + + # source://actionpack//lib/action_controller/test_case.rb#561 + def _controller_class=(_arg0); end + + # source://actionpack//lib/action_controller/test_case.rb#561 + def _controller_class?; end + + class << self + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks; end + + # source://actionpack//lib/action_controller/test_case.rb#561 + def _controller_class; end + + # source://actionpack//lib/action_controller/test_case.rb#561 + def _controller_class=(value); end + + # source://actionpack//lib/action_controller/test_case.rb#561 + def _controller_class?; end + + # source://actionpack//lib/action_controller/test_case.rb#336 + def executor_around_each_request; end + + # source://actionpack//lib/action_controller/test_case.rb#336 + def executor_around_each_request=(_arg0); end + end +end + +# source://actionpack//lib/action_controller/test_case.rb#338 +module ActionController::TestCase::Behavior + include ::ActionDispatch::TestProcess::FixtureFile + include ::ActionDispatch::TestProcess + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActiveSupport::Testing::ConstantLookup + include ::Rails::Dom::Testing::Assertions + include ::ActionController::TemplateAssertions + include ::ActionDispatch::Assertions + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods + mixes_in_class_methods ::ActionController::TestCase::Behavior::ClassMethods + + # source://actionpack//lib/action_controller/test_case.rb#554 + def build_response(klass); end + + # source://actionpack//lib/action_controller/test_case.rb#514 + def controller_class_name; end + + # Simulate a DELETE request with the given parameters and set/volley the response. + # See +get+ for more details. + # + # source://actionpack//lib/action_controller/test_case.rb#429 + def delete(action, **args); end + + # source://actionpack//lib/action_controller/test_case.rb#518 + def generated_path(generated_extras); end + + # Simulate a GET request with the given parameters. + # + # - +action+: The controller action to call. + # - +params+: The hash with HTTP parameters that you want to pass. This may be +nil+. + # - +body+: The request body with a string that is appropriately encoded + # (application/x-www-form-urlencoded or multipart/form-data). + # - +session+: A hash of parameters to store in the session. This may be +nil+. + # - +flash+: A hash of parameters to store in the flash. This may be +nil+. + # + # You can also simulate POST, PATCH, PUT, DELETE, and HEAD requests with + # +post+, +patch+, +put+, +delete+, and +head+. + # Example sending parameters, session, and setting a flash message: + # + # get :show, + # params: { id: 7 }, + # session: { user_id: 1 }, + # flash: { notice: 'This is flash message' } + # + # Note that the request method is not verified. The different methods are + # available to make the tests more expressive. + # + # source://actionpack//lib/action_controller/test_case.rb#403 + def get(action, **args); end + + # Simulate a HEAD request with the given parameters and set/volley the response. + # See +get+ for more details. + # + # source://actionpack//lib/action_controller/test_case.rb#435 + def head(action, **args); end + + # Simulate a PATCH request with the given parameters and set/volley the response. + # See +get+ for more details. + # + # source://actionpack//lib/action_controller/test_case.rb#417 + def patch(action, **args); end + + # Simulate a POST request with the given parameters and set/volley the response. + # See +get+ for more details. + # + # source://actionpack//lib/action_controller/test_case.rb#411 + def post(action, **args); end + + # Simulate an HTTP request to +action+ by specifying request method, + # parameters and set/volley the response. + # + # - +action+: The controller action to call. + # - +method+: Request method used to send the HTTP request. Possible values + # are +GET+, +POST+, +PATCH+, +PUT+, +DELETE+, +HEAD+. Defaults to +GET+. Can be a symbol. + # - +params+: The hash with HTTP parameters that you want to pass. This may be +nil+. + # - +body+: The request body with a string that is appropriately encoded + # (application/x-www-form-urlencoded or multipart/form-data). + # - +session+: A hash of parameters to store in the session. This may be +nil+. + # - +flash+: A hash of parameters to store in the flash. This may be +nil+. + # - +format+: Request format. Defaults to +nil+. Can be string or symbol. + # - +as+: Content type. Defaults to +nil+. Must be a symbol that corresponds + # to a mime type. + # + # Example calling +create+ action and sending two params: + # + # process :create, + # method: 'POST', + # params: { + # user: { name: 'Gaurish Sharma', email: 'user@example.com' } + # }, + # session: { user_id: 1 }, + # flash: { notice: 'This is flash message' } + # + # To simulate +GET+, +POST+, +PATCH+, +PUT+, +DELETE+, and +HEAD+ requests + # prefer using #get, #post, #patch, #put, #delete and #head methods + # respectively which will make tests more expressive. + # + # It's not recommended to make more than one request in the same test. Instance + # variables that are set in one request will not persist to the next request, + # but it's not guaranteed that all Rails internal state will be reset. Prefer + # ActionDispatch::IntegrationTest for making multiple requests in the same test. + # + # Note that the request method is not verified. + # + # source://actionpack//lib/action_controller/test_case.rb#474 + def process(action, method: T.unsafe(nil), params: T.unsafe(nil), session: T.unsafe(nil), body: T.unsafe(nil), flash: T.unsafe(nil), format: T.unsafe(nil), xhr: T.unsafe(nil), as: T.unsafe(nil)); end + + # Simulate a PUT request with the given parameters and set/volley the response. + # See +get+ for more details. + # + # source://actionpack//lib/action_controller/test_case.rb#423 + def put(action, **args); end + + # source://actionpack//lib/action_controller/test_case.rb#522 + def query_parameter_names(generated_extras); end + + # Returns the value of attribute request. + # + # source://actionpack//lib/action_controller/test_case.rb#344 + def request; end + + # Returns the value of attribute response. + # + # source://actionpack//lib/action_controller/test_case.rb#344 + def response; end + + # source://actionpack//lib/action_controller/test_case.rb#526 + def setup_controller_request_and_response; end + + private + + # source://actionpack//lib/action_controller/test_case.rb#646 + def check_required_ivars; end + + # source://actionpack//lib/action_controller/test_case.rb#642 + def document_root_element; end + + # source://actionpack//lib/action_controller/test_case.rb#597 + def process_controller_response(action, cookies, xhr); end + + # source://actionpack//lib/action_controller/test_case.rb#632 + def scrub_env!(env); end + + # source://actionpack//lib/action_controller/test_case.rb#567 + def setup_request(controller_class_name, action, parameters, session, flash, xhr); end + + # source://actionpack//lib/action_controller/test_case.rb#589 + def wrap_execution(&block); end + + module GeneratedClassMethods + def _controller_class; end + def _controller_class=(value); end + def _controller_class?; end + end + + module GeneratedInstanceMethods + def _controller_class; end + def _controller_class=(value); end + def _controller_class?; end + end +end + +# source://actionpack//lib/action_controller/test_case.rb#346 +module ActionController::TestCase::Behavior::ClassMethods + # source://actionpack//lib/action_controller/test_case.rb#368 + def controller_class; end + + # source://actionpack//lib/action_controller/test_case.rb#364 + def controller_class=(new_class); end + + # source://actionpack//lib/action_controller/test_case.rb#376 + def determine_default_controller_class(name); end + + # Sets the controller class name. Useful if the name can't be inferred from test class. + # Normalizes +controller_class+ before using. + # + # tests WidgetController + # tests :widget + # tests 'widget' + # + # source://actionpack//lib/action_controller/test_case.rb#353 + def tests(controller_class); end +end + +# ActionController::TestCase will be deprecated and moved to a gem in the future. +# Please use ActionDispatch::IntegrationTest going forward. +# +# source://actionpack//lib/action_controller/test_case.rb#34 +class ActionController::TestRequest < ::ActionDispatch::TestRequest + # @return [TestRequest] a new instance of TestRequest + # + # source://actionpack//lib/action_controller/test_case.rb#57 + def initialize(env, session, controller_class); end + + # source://actionpack//lib/action_controller/test_case.rb#76 + def assign_parameters(routes, controller_path, action, parameters, generated_path, query_string_keys); end + + # source://actionpack//lib/action_controller/test_case.rb#72 + def content_type=(type); end + + # Returns the value of attribute controller_class. + # + # source://actionpack//lib/action_controller/test_case.rb#42 + def controller_class; end + + # source://actionpack//lib/action_controller/test_case.rb#68 + def query_string=(string); end + + private + + # source://actionpack//lib/action_controller/test_case.rb#164 + def params_parsers; end + + class << self + # Create a new test request with default `env` values. + # + # source://actionpack//lib/action_controller/test_case.rb#45 + def create(controller_class); end + + # source://actionpack//lib/action_controller/test_case.rb#38 + def new_session; end + + private + + # source://actionpack//lib/action_controller/test_case.rb#52 + def default_env; end + end +end + +# source://actionpack//lib/action_controller/test_case.rb#35 +ActionController::TestRequest::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_controller/test_case.rb#136 +ActionController::TestRequest::ENCODER = T.let(T.unsafe(nil), T.untyped) + +# Methods #destroy and #load! are overridden to avoid calling methods on the +# +# source://actionpack//lib/action_controller/test_case.rb#182 +class ActionController::TestSession < ::Rack::Session::Abstract::PersistedSecure::SecureSessionHash + # @return [TestSession] a new instance of TestSession + # + # source://actionpack//lib/action_controller/test_case.rb#185 + def initialize(session = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/test_case.rb#204 + def destroy; end + + # source://actionpack//lib/action_controller/test_case.rb#208 + def dig(*keys); end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/test_case.rb#217 + def enabled?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_controller/test_case.rb#192 + def exists?; end + + # source://actionpack//lib/action_controller/test_case.rb#213 + def fetch(key, *args, &block); end + + # source://actionpack//lib/action_controller/test_case.rb#196 + def keys; end + + # source://actionpack//lib/action_controller/test_case.rb#200 + def values; end + + private + + # source://actionpack//lib/action_controller/test_case.rb#222 + def load!; end +end + +# source://actionpack//lib/action_controller/test_case.rb#183 +ActionController::TestSession::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_controller/metal/testing.rb#4 +module ActionController::Testing; end + +# Behavior specific to functional tests +# +# source://actionpack//lib/action_controller/metal/testing.rb#6 +module ActionController::Testing::Functional + # source://actionpack//lib/action_controller/metal/testing.rb#7 + def clear_instance_variables_between_requests; end + + # source://actionpack//lib/action_controller/metal/testing.rb#16 + def recycle!; end +end + +# Raised when a Parameters instance is not marked as permitted and +# an operation to transform it to hash is called. +# +# params = ActionController::Parameters.new(a: "123", b: "456") +# params.to_h +# # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash +# +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#61 +class ActionController::UnfilteredParameters < ::ArgumentError + # @return [UnfilteredParameters] a new instance of UnfilteredParameters + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#62 + def initialize; end +end + +# source://actionpack//lib/action_controller/metal/exceptions.rb#73 +class ActionController::UnknownFormat < ::ActionController::ActionControllerError; end + +# source://actionpack//lib/action_controller/metal/exceptions.rb#70 +class ActionController::UnknownHttpMethod < ::ActionController::ActionControllerError; end + +# Raised when a supplied parameter is not expected and +# ActionController::Parameters.action_on_unpermitted_parameters +# is set to :raise. +# +# params = ActionController::Parameters.new(a: "123", b: "456") +# params.permit(:c) +# # => ActionController::UnpermittedParameters: found unpermitted parameters: :a, :b +# +# source://actionpack//lib/action_controller/metal/strong_parameters.rb#46 +class ActionController::UnpermittedParameters < ::IndexError + # @return [UnpermittedParameters] a new instance of UnpermittedParameters + # + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#49 + def initialize(params); end + + # source://actionpack//lib/action_controller/metal/strong_parameters.rb#47 + def params; end +end + +# Includes +url_for+ into the host class. The class has to provide a +RouteSet+ by implementing +# the _routes method. Otherwise, an exception will be raised. +# +# In addition to AbstractController::UrlFor, this module accesses the HTTP layer to define +# URL options like the +host+. In order to do so, this module requires the host class +# to implement +env+ which needs to be Rack-compatible and +request+ +# which is either an instance of ActionDispatch::Request or an object +# that responds to the +host+, +optional_port+, +protocol+, and +# +symbolized_path_parameter+ methods. +# +# class RootUrl +# include ActionController::UrlFor +# include Rails.application.routes.url_helpers +# +# delegate :env, :request, to: :controller +# +# def initialize(controller) +# @controller = controller +# @url = root_path # named route from the application. +# end +# end +# +# source://actionpack//lib/action_controller/metal/url_for.rb#25 +module ActionController::UrlFor + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActionDispatch::Routing::UrlFor + include ::AbstractController::UrlFor + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::UrlFor::ClassMethods + + # source://actionpack//lib/action_controller/metal/url_for.rb#30 + def url_options; end + + module GeneratedClassMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end + + module GeneratedInstanceMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end +end + +# source://actionpack//lib/action_controller/metal/exceptions.rb#25 +class ActionController::UrlGenerationError < ::ActionController::ActionControllerError + include ::DidYouMean::Correctable + + # @return [UrlGenerationError] a new instance of UrlGenerationError + # + # source://actionpack//lib/action_controller/metal/exceptions.rb#28 + def initialize(message, routes = T.unsafe(nil), route_name = T.unsafe(nil), method_name = T.unsafe(nil)); end + + # source://actionpack//lib/action_controller/metal/exceptions.rb#39 + def corrections; end + + # Returns the value of attribute method_name. + # + # source://actionpack//lib/action_controller/metal/exceptions.rb#26 + def method_name; end + + # Returns the value of attribute route_name. + # + # source://actionpack//lib/action_controller/metal/exceptions.rb#26 + def route_name; end + + # Returns the value of attribute routes. + # + # source://actionpack//lib/action_controller/metal/exceptions.rb#26 + def routes; end +end + +# source://actionpack//lib/action_dispatch.rb#37 +module ActionDispatch + extend ::ActiveSupport::Autoload + + # source://actionpack//lib/action_dispatch.rb#99 + def test_app; end + + # source://actionpack//lib/action_dispatch.rb#99 + def test_app=(val); end + + class << self + # source://actionpack//lib/action_dispatch.rb#99 + def test_app; end + + # source://actionpack//lib/action_dispatch.rb#99 + def test_app=(val); end + end +end + +# source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#8 +class ActionDispatch::ActionableExceptions + # @return [ActionableExceptions] a new instance of ActionableExceptions + # + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#11 + def initialize(app); end + + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#15 + def call(env); end + + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#9 + def endpoint; end + + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#9 + def endpoint=(val); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#25 + def actionable_request?(request); end + + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#29 + def redirect_to(location); end + + class << self + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#9 + def endpoint; end + + # source://actionpack//lib/action_dispatch/middleware/actionable_exceptions.rb#9 + def endpoint=(val); end + end +end + +# This is a class that abstracts away an asserted response. It purposely +# does not inherit from Response because it doesn't need it. That means it +# does not have headers or a body. +# +# source://actionpack//lib/action_dispatch/testing/assertion_response.rb#7 +class ActionDispatch::AssertionResponse + # Accepts a specific response status code as an Integer (404) or String + # ('404') or a response status range as a Symbol pseudo-code (:success, + # indicating any 200-299 status code). + # + # @raise [ArgumentError] + # @return [AssertionResponse] a new instance of AssertionResponse + # + # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#20 + def initialize(code_or_name); end + + # Returns the value of attribute code. + # + # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#8 + def code; end + + # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#33 + def code_and_name; end + + # Returns the value of attribute name. + # + # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#8 + def name; end + + private + + # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#38 + def code_from_name(name); end + + # source://actionpack//lib/action_dispatch/testing/assertion_response.rb#42 + def name_from_code(code); end +end + +# source://actionpack//lib/action_dispatch/testing/assertion_response.rb#10 +ActionDispatch::AssertionResponse::GENERIC_RESPONSE_CODES = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/testing/assertions/response.rb#4 +module ActionDispatch::Assertions + include ::ActionDispatch::Assertions::ResponseAssertions + include ::ActionDispatch::Assertions::RoutingAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + + # source://actionpack//lib/action_dispatch/testing/assertions.rb#13 + def html_document; end +end + +# A small suite of assertions that test responses from \Rails applications. +# +# source://actionpack//lib/action_dispatch/testing/assertions/response.rb#6 +module ActionDispatch::Assertions::ResponseAssertions + # Asserts that the response is a redirect to a URL matching the given options. + # + # # Asserts that the redirection was to the "index" action on the WeblogController + # assert_redirected_to controller: "weblog", action: "index" + # + # # Asserts that the redirection was to the named route login_url + # assert_redirected_to login_url + # + # # Asserts that the redirection was to the URL for @customer + # assert_redirected_to @customer + # + # # Asserts that the redirection matches the regular expression + # assert_redirected_to %r(\Ahttp://example.org) + # + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#53 + def assert_redirected_to(options = T.unsafe(nil), message = T.unsafe(nil)); end + + # Asserts that the response is one of the following types: + # + # * :success - Status code was in the 200-299 range + # * :redirect - Status code was in the 300-399 range + # * :missing - Status code was 404 + # * :error - Status code was in the 500-599 range + # + # You can also pass an explicit status number like assert_response(501) + # or its symbolic equivalent assert_response(:not_implemented). + # See Rack::Utils::SYMBOL_TO_STATUS_CODE for a full list. + # + # # Asserts that the response was a redirection + # assert_response :redirect + # + # # Asserts that the response code was status code 401 (unauthorized) + # assert_response 401 + # + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#30 + def assert_response(type, message = T.unsafe(nil)); end + + private + + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#95 + def code_with_name(code_or_name); end + + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#79 + def generate_response_message(expected, actual = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#89 + def location_if_redirected; end + + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#70 + def normalize_argument_to_redirection(fragment); end + + # Proxy to to_param if the object will respond to it. + # + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#66 + def parameterize(value); end + + # source://actionpack//lib/action_dispatch/testing/assertions/response.rb#84 + def response_body_if_short; end +end + +# source://actionpack//lib/action_dispatch/testing/assertions/response.rb#7 +ActionDispatch::Assertions::ResponseAssertions::RESPONSE_PREDICATES = T.let(T.unsafe(nil), Hash) + +# Suite of assertions to test routes generated by \Rails and the handling of requests made to them. +# +# source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#11 +module ActionDispatch::Assertions::RoutingAssertions + # Asserts that the provided options can be used to generate the provided path. This is the inverse of +assert_recognizes+. + # The +extras+ parameter is used to tell the request the names and values of additional request parameters that would be in + # a query string. The +message+ parameter allows you to specify a custom error message for assertion failures. + # + # The +defaults+ parameter is unused. + # + # # Asserts that the default action is generated for a route with no action + # assert_generates "/items", controller: "items", action: "index" + # + # # Tests that the list action is properly routed + # assert_generates "/items/list", controller: "items", action: "list" + # + # # Tests the generation of a route with a parameter + # assert_generates "/items/list/1", { controller: "items", action: "list", id: "1" } + # + # # Asserts that the generated route gives us our custom route + # assert_generates "changesets/12", { controller: 'scm', action: 'show_diff', revision: "12" } + # + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#85 + def assert_generates(expected_path, options, defaults = T.unsafe(nil), extras = T.unsafe(nil), message = T.unsafe(nil)); end + + # Asserts that the routing of the given +path+ was handled correctly and that the parsed options (given in the +expected_options+ hash) + # match +path+. Basically, it asserts that \Rails recognizes the route given by +expected_options+. + # + # Pass a hash in the second argument (+path+) to specify the request method. This is useful for routes + # requiring a specific HTTP method. The hash should contain a +:path+ with the incoming request path + # and a +:method+ containing the required HTTP verb. + # + # # Asserts that POSTing to /items will call the create action on ItemsController + # assert_recognizes({controller: 'items', action: 'create'}, {path: 'items', method: :post}) + # + # You can also pass in +extras+ with a hash containing URL parameters that would normally be in the query string. This can be used + # to assert that values in the query string will end up in the params hash correctly. To test query strings you must use the extras + # argument because appending the query string on the path directly will not work. For example: + # + # # Asserts that a path of '/items/list/1?view=print' returns the correct options + # assert_recognizes({controller: 'items', action: 'list', id: '1', view: 'print'}, 'items/list/1', { view: "print" }) + # + # The +message+ parameter allows you to pass in an error message that is displayed upon failure. + # + # # Check the default route (i.e., the index action) + # assert_recognizes({controller: 'items', action: 'index'}, 'items') + # + # # Test a specific action + # assert_recognizes({controller: 'items', action: 'list'}, 'items/list') + # + # # Test an action with a parameter + # assert_recognizes({controller: 'items', action: 'destroy', id: '1'}, 'items/destroy/1') + # + # # Test a custom route + # assert_recognizes({controller: 'items', action: 'show', id: '1'}, 'view/item1') + # + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#47 + def assert_recognizes(expected_options, path, extras = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Asserts that path and options match both ways; in other words, it verifies that path generates + # options and then that options generates path. This essentially combines +assert_recognizes+ + # and +assert_generates+ into one step. + # + # The +extras+ hash allows you to specify options that would normally be provided as a query string to the action. The + # +message+ parameter allows you to specify a custom error message to display upon failure. + # + # # Asserts a basic route: a controller with the default action (index) + # assert_routing '/home', controller: 'home', action: 'index' + # + # # Test a route generated with a specific controller, action, and parameter (id) + # assert_routing '/entries/show/23', controller: 'entries', action: 'show', id: 23 + # + # # Asserts a basic route (controller + default action), with an error message if it fails + # assert_routing '/store', { controller: 'store', action: 'index' }, {}, {}, 'Route for store index not generated properly' + # + # # Tests a route, providing a defaults hash + # assert_routing 'controller/action/9', {id: "9", item: "square"}, {controller: "controller", action: "action"}, {}, {item: "square"} + # + # # Tests a route with an HTTP method + # assert_routing({ method: 'put', path: '/product/321' }, { controller: "product", action: "update", id: "321" }) + # + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#128 + def assert_routing(path, options, defaults = T.unsafe(nil), extras = T.unsafe(nil), message = T.unsafe(nil)); end + + # ROUTES TODO: These assertions should really work in an integration context + # + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#183 + def method_missing(selector, *args, **_arg2, &block); end + + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#12 + def setup; end + + # A helper to make it easier to test different route configurations. + # This method temporarily replaces @routes with a new RouteSet instance. + # + # The new instance is yielded to the passed block. Typically the block + # will create some routes using set.draw { match ... }: + # + # with_routing do |set| + # set.draw do + # resources :users + # end + # assert_equal "/users", users_path + # end + # + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#153 + def with_routing; end + + private + + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#228 + def fail_on(exception_class, message); end + + # Recognizes the route for a given path. + # + # source://actionpack//lib/action_dispatch/testing/assertions/routing.rb#194 + def recognized_request_for(path, extras = T.unsafe(nil), msg); end +end + +# Provides callbacks to be executed before and after dispatching the request. +# +# source://actionpack//lib/action_dispatch/middleware/callbacks.rb#5 +class ActionDispatch::Callbacks + include ::ActiveSupport::Callbacks + extend ::ActiveSupport::Callbacks::ClassMethods + extend ::ActiveSupport::DescendantsTracker + + # @return [Callbacks] a new instance of Callbacks + # + # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#20 + def initialize(app); end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks?; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#940 + def _call_callbacks; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#928 + def _run_call_callbacks(&block); end + + # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#24 + def call(env); end + + class << self + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks?; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#932 + def _call_callbacks; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#936 + def _call_callbacks=(value); end + + # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#15 + def after(*args, &block); end + + # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#11 + def before(*args, &block); end + end +end + +# Configures the HTTP +# {Content-Security-Policy}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy] +# response header to help protect against XSS and injection attacks. +# +# Example global policy: +# +# Rails.application.config.content_security_policy do |policy| +# policy.default_src :self, :https +# policy.font_src :self, :https, :data +# policy.img_src :self, :https, :data +# policy.object_src :none +# policy.script_src :self, :https +# policy.style_src :self, :https +# +# # Specify URI for violation reports +# policy.report_uri "/csp-violation-report-endpoint" +# end +# +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#24 +class ActionDispatch::ContentSecurityPolicy + # @return [ContentSecurityPolicy] a new instance of ContentSecurityPolicy + # @yield [_self] + # @yieldparam _self [ActionDispatch::ContentSecurityPolicy] the object that the method was called on + # + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#169 + def initialize; end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def base_uri(*sources); end + + # Specify whether to prevent the user agent from loading any assets over + # HTTP when the page uses HTTPS: + # + # policy.block_all_mixed_content + # + # Pass +false+ to allow it again: + # + # policy.block_all_mixed_content false + # + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#197 + def block_all_mixed_content(enabled = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#286 + def build(context = T.unsafe(nil), nonce = T.unsafe(nil), nonce_directives = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def child_src(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def connect_src(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def default_src(*sources); end + + # Returns the value of attribute directives. + # + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#167 + def directives; end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def font_src(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def form_action(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def frame_ancestors(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def frame_src(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def img_src(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def manifest_src(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def media_src(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def object_src(*sources); end + + # Restricts the set of plugins that can be embedded: + # + # policy.plugin_types "application/x-shockwave-flash" + # + # Leave empty to allow all plugins: + # + # policy.plugin_types + # + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#213 + def plugin_types(*types); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def prefetch_src(*sources); end + + # Enable the {report-uri}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/report-uri] + # directive. Violation reports will be sent to the specified URI: + # + # policy.report_uri "/csp-violation-report-endpoint" + # + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#226 + def report_uri(uri); end + + # Specify asset types for which {Subresource Integrity}[https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity] + # is required: + # + # policy.require_sri_for :script, :style + # + # Leave empty to not require Subresource Integrity: + # + # policy.require_sri_for + # + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#239 + def require_sri_for(*types); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def require_trusted_types_for(*sources); end + + # Specify whether a {sandbox}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/sandbox] + # should be enabled for the requested resource: + # + # policy.sandbox + # + # Values can be passed as arguments: + # + # policy.sandbox "allow-scripts", "allow-modals" + # + # Pass +false+ to disable the sandbox: + # + # policy.sandbox false + # + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#260 + def sandbox(*values); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def script_src(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def script_src_attr(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def script_src_elem(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def style_src(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def style_src_attr(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def style_src_elem(*sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def trusted_types(*sources); end + + # Specify whether user agents should treat any assets over HTTP as HTTPS: + # + # policy.upgrade_insecure_requests + # + # Pass +false+ to disable it: + # + # policy.upgrade_insecure_requests false + # + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#278 + def upgrade_insecure_requests(enabled = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#179 + def worker_src(*sources); end + + private + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#305 + def apply_mapping(source); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#292 + def apply_mappings(sources); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#327 + def build_directive(sources, context); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#311 + def build_directives(context, nonce, nonce_directives); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#174 + def initialize_copy(other); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#349 + def nonce_directive?(directive, nonce_directives); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#331 + def resolve_source(source, context); end +end + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#163 +ActionDispatch::ContentSecurityPolicy::DEFAULT_NONCE_DIRECTIVES = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#138 +ActionDispatch::ContentSecurityPolicy::DIRECTIVES = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#119 +ActionDispatch::ContentSecurityPolicy::MAPPINGS = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#25 +class ActionDispatch::ContentSecurityPolicy::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#30 + def initialize(app); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#34 + def call(env); end + + private + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#51 + def header_name(request); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#59 + def policy_present?(headers); end +end + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#26 +ActionDispatch::ContentSecurityPolicy::Middleware::CONTENT_TYPE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#27 +ActionDispatch::ContentSecurityPolicy::Middleware::POLICY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#28 +ActionDispatch::ContentSecurityPolicy::Middleware::POLICY_REPORT_ONLY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#64 +module ActionDispatch::ContentSecurityPolicy::Request + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#71 + def content_security_policy; end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#75 + def content_security_policy=(policy); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#103 + def content_security_policy_nonce; end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#95 + def content_security_policy_nonce_directives; end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#99 + def content_security_policy_nonce_directives=(generator); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#87 + def content_security_policy_nonce_generator; end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#91 + def content_security_policy_nonce_generator=(generator); end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#79 + def content_security_policy_report_only; end + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#83 + def content_security_policy_report_only=(value); end + + private + + # source://actionpack//lib/action_dispatch/http/content_security_policy.rb#114 + def generate_content_security_policy_nonce; end +end + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#68 +ActionDispatch::ContentSecurityPolicy::Request::NONCE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#69 +ActionDispatch::ContentSecurityPolicy::Request::NONCE_DIRECTIVES = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#67 +ActionDispatch::ContentSecurityPolicy::Request::NONCE_GENERATOR = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#65 +ActionDispatch::ContentSecurityPolicy::Request::POLICY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/content_security_policy.rb#66 +ActionDispatch::ContentSecurityPolicy::Request::POLICY_REPORT_ONLY = T.let(T.unsafe(nil), String) + +# Read and write data to cookies through ActionController::Base#cookies. +# +# When reading cookie data, the data is read from the HTTP request header, Cookie. +# When writing cookie data, the data is sent out in the HTTP response header, Set-Cookie. +# +# Examples of writing: +# +# # Sets a simple session cookie. +# # This cookie will be deleted when the user's browser is closed. +# cookies[:user_name] = "david" +# +# # Cookie values are String-based. Other data types need to be serialized. +# cookies[:lat_lon] = JSON.generate([47.68, -122.37]) +# +# # Sets a cookie that expires in 1 hour. +# cookies[:login] = { value: "XJ-122", expires: 1.hour } +# +# # Sets a cookie that expires at a specific time. +# cookies[:login] = { value: "XJ-122", expires: Time.utc(2020, 10, 15, 5) } +# +# # Sets a signed cookie, which prevents users from tampering with its value. +# # It can be read using the signed method `cookies.signed[:name]` +# cookies.signed[:user_id] = current_user.id +# +# # Sets an encrypted cookie value before sending it to the client which +# # prevent users from reading and tampering with its value. +# # It can be read using the encrypted method `cookies.encrypted[:name]` +# cookies.encrypted[:discount] = 45 +# +# # Sets a "permanent" cookie (which expires in 20 years from now). +# cookies.permanent[:login] = "XJ-122" +# +# # You can also chain these methods: +# cookies.signed.permanent[:login] = "XJ-122" +# +# Examples of reading: +# +# cookies[:user_name] # => "david" +# cookies.size # => 2 +# JSON.parse(cookies[:lat_lon]) # => [47.68, -122.37] +# cookies.signed[:login] # => "XJ-122" +# cookies.encrypted[:discount] # => 45 +# +# Example for deleting: +# +# cookies.delete :user_name +# +# Please note that if you specify a +:domain+ when setting a cookie, you must also specify the domain when deleting the cookie: +# +# cookies[:name] = { +# value: 'a yummy cookie', +# expires: 1.year, +# domain: 'domain.com' +# } +# +# cookies.delete(:name, domain: 'domain.com') +# +# The option symbols for setting cookies are: +# +# * :value - The cookie's value. +# * :path - The path for which this cookie applies. Defaults to the root +# of the application. +# * :domain - The domain for which this cookie applies so you can +# restrict to the domain level. If you use a schema like www.example.com +# and want to share session with user.example.com set :domain +# to :all. To support multiple domains, provide an array, and +# the first domain matching request.host will be used. Make +# sure to specify the :domain option with :all or +# Array again when deleting cookies. +# +# domain: nil # Does not set cookie domain. (default) +# domain: :all # Allow the cookie for the top most level +# # domain and subdomains. +# domain: %w(.example.com .example.org) # Allow the cookie +# # for concrete domain names. +# +# * :tld_length - When using :domain => :all, this option can be used to explicitly +# set the TLD length when using a short (<= 3 character) domain that is being interpreted as part of a TLD. +# For example, to share cookies between user1.lvh.me and user2.lvh.me, set :tld_length to 2. +# * :expires - The time at which this cookie expires, as a \Time or ActiveSupport::Duration object. +# * :secure - Whether this cookie is only transmitted to HTTPS servers. +# Default is +false+. +# * :httponly - Whether this cookie is accessible via scripting or +# only HTTP. Defaults to +false+. +# * :same_site - The value of the +SameSite+ cookie attribute, which +# determines how this cookie should be restricted in cross-site contexts. +# Possible values are +:none+, +:lax+, and +:strict+. Defaults to +:lax+. +# +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#182 +class ActionDispatch::Cookies + # @return [Cookies] a new instance of Cookies + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#697 + def initialize(app); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#701 + def call(env); end +end + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#188 +ActionDispatch::Cookies::AUTHENTICATED_ENCRYPTED_COOKIE_SALT = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#485 +class ActionDispatch::Cookies::AbstractCookieJar + include ::ActionDispatch::Cookies::ChainedCookieJars + + # @return [AbstractCookieJar] a new instance of AbstractCookieJar + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#488 + def initialize(parent_jar); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#492 + def [](name); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#504 + def []=(name, options); end + + protected + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#516 + def request; end + + private + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#534 + def commit(name, options); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#527 + def cookie_metadata(name, options); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#519 + def expiry_options(options); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#533 + def parse(name, data, purpose: T.unsafe(nil)); end +end + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#194 +ActionDispatch::Cookies::COOKIES_DIGEST = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#195 +ActionDispatch::Cookies::COOKIES_ROTATIONS = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#196 +ActionDispatch::Cookies::COOKIES_SAME_SITE_PROTECTION = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#193 +ActionDispatch::Cookies::COOKIES_SERIALIZER = T.let(T.unsafe(nil), String) + +# Include in a cookie jar to allow chaining, e.g. +cookies.permanent.signed+. +# +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#206 +module ActionDispatch::Cookies::ChainedCookieJars + # Returns a jar that'll automatically encrypt cookie values before sending them to the client and will decrypt them for read. + # If the cookie was tampered with by the user (or a 3rd party), +nil+ will be returned. + # + # If +config.action_dispatch.encrypted_cookie_salt+ and +config.action_dispatch.encrypted_signed_cookie_salt+ + # are both set, legacy cookies encrypted with HMAC AES-256-CBC will be transparently upgraded. + # + # This jar requires that you set a suitable secret for the verification on your app's +secret_key_base+. + # + # Example: + # + # cookies.encrypted[:discount] = 45 + # # => Set-Cookie: discount=DIQ7fw==--K3n//8vvnSbGq9dA--7Xh91HfLpwzbj1czhBiwOg==; path=/ + # + # cookies.encrypted[:discount] # => 45 + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#252 + def encrypted; end + + # Returns a jar that'll automatically set the assigned cookies to have an expiration date 20 years from now. Example: + # + # cookies.permanent[:prefers_open_id] = true + # # => Set-Cookie: prefers_open_id=true; path=/; expires=Sun, 16-Dec-2029 03:24:16 GMT + # + # This jar is only meant for writing. You'll read permanent cookies through the regular accessor. + # + # This jar allows chaining with the signed jar as well, so you can set permanent, signed cookies. Examples: + # + # cookies.permanent.signed[:remember_me] = current_user.id + # # => Set-Cookie: remember_me=BAhU--848956038e692d7046deab32b7131856ab20e14e; path=/; expires=Sun, 16-Dec-2029 03:24:16 GMT + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#218 + def permanent; end + + # Returns a jar that'll automatically generate a signed representation of cookie value and verify it when reading from + # the cookie again. This is useful for creating cookies with values that the user is not supposed to change. If a signed + # cookie was tampered with by the user (or a 3rd party), +nil+ will be returned. + # + # This jar requires that you set a suitable secret for the verification on your app's +secret_key_base+. + # + # Example: + # + # cookies.signed[:discount] = 45 + # # => Set-Cookie: discount=BAhpMg==--2c1c6906c90a3bc4fd54a51ffb41dffa4bf6b5f7; path=/ + # + # cookies.signed[:discount] # => 45 + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#234 + def signed; end + + # Returns the +signed+ or +encrypted+ jar, preferring +encrypted+ if +secret_key_base+ is set. + # Used by ActionDispatch::Session::CookieStore to avoid the need to introduce new cookie stores. + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#258 + def signed_or_encrypted; end + + private + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#281 + def encrypted_cookie_cipher; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#275 + def prepare_upgrade_legacy_hmac_aes_cbc_cookies?; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#285 + def signed_cookie_digest; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#268 + def upgrade_legacy_hmac_aes_cbc_cookies?; end +end + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#290 +class ActionDispatch::Cookies::CookieJar + include ::ActionDispatch::Cookies::ChainedCookieJars + include ::Enumerable + + # @return [CookieJar] a new instance of CookieJar + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#301 + def initialize(request); end + + # Returns the value of the cookie by +name+, or +nil+ if no such cookie exists. + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#322 + def [](name); end + + # Sets the cookie named +name+. The second argument may be the cookie's + # value or a hash of options as documented above. + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#356 + def []=(name, options); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#410 + def always_write_cookie; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#410 + def always_write_cookie=(val); end + + # Removes all cookies on the client machine by calling delete for each cookie. + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#400 + def clear(options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#311 + def commit!; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#309 + def committed?; end + + # Removes the cookie on the client machine by setting the value to an empty string + # and the expiration date in the past. Like []=, you can pass in + # an options hash to delete cookies with extra data such as a :path. + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#379 + def delete(name, options = T.unsafe(nil)); end + + # Whether the given cookie is to be deleted by this CookieJar. + # Like []=, you can pass in an options hash to test if a + # deletion applies to a specific :path, :domain etc. + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#393 + def deleted?(name, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#317 + def each(&block); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#326 + def fetch(name, *args, &block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#330 + def has_key?(name); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#330 + def key?(name); end + + # Returns the value of attribute request. + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#299 + def request; end + + # Returns the cookies as Hash. + def to_hash(*_arg0); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#350 + def to_header; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#338 + def update(other_hash); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#343 + def update_cookies_from_jar; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#404 + def write(headers); end + + private + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#413 + def escape(string); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#434 + def handle_options(options); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#417 + def make_set_cookie_header(header); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#430 + def write_cookie?(cookie); end + + class << self + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#410 + def always_write_cookie; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#410 + def always_write_cookie=(val); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#293 + def build(req, cookies); end + end +end + +# Raised when storing more than 4K of session data. +# +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#203 +class ActionDispatch::Cookies::CookieOverflow < ::StandardError; end + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#190 +ActionDispatch::Cookies::ENCRYPTED_COOKIE_CIPHER = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#186 +ActionDispatch::Cookies::ENCRYPTED_COOKIE_SALT = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#187 +ActionDispatch::Cookies::ENCRYPTED_SIGNED_COOKIE_SALT = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#645 +class ActionDispatch::Cookies::EncryptedKeyRotatingCookieJar < ::ActionDispatch::Cookies::AbstractCookieJar + include ::ActionDispatch::Cookies::SerializedCookieJars + + # @return [EncryptedKeyRotatingCookieJar] a new instance of EncryptedKeyRotatingCookieJar + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#648 + def initialize(parent_jar); end + + private + + # @raise [CookieOverflow] + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#690 + def commit(name, options); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#682 + def parse(name, encrypted_message, purpose: T.unsafe(nil)); end +end + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#184 +ActionDispatch::Cookies::GENERATOR_KEY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#183 +ActionDispatch::Cookies::HTTP_HEADER = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#556 +class ActionDispatch::Cookies::JsonSerializer + class << self + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#561 + def dump(value); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#557 + def load(value); end + end +end + +# Cookies can typically store 4096 bytes. +# +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#200 +ActionDispatch::Cookies::MAX_COOKIE_SIZE = T.let(T.unsafe(nil), Integer) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#544 +class ActionDispatch::Cookies::MarshalWithJsonFallback + class << self + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#551 + def dump(value); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#545 + def load(value); end + end +end + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#537 +class ActionDispatch::Cookies::PermanentCookieJar < ::ActionDispatch::Cookies::AbstractCookieJar + private + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#539 + def commit(name, options); end +end + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#192 +ActionDispatch::Cookies::SECRET_KEY_BASE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#191 +ActionDispatch::Cookies::SIGNED_COOKIE_DIGEST = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#185 +ActionDispatch::Cookies::SIGNED_COOKIE_SALT = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#566 +module ActionDispatch::Cookies::SerializedCookieJars + protected + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#579 + def deserialize(name); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#611 + def digest; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#571 + def needs_migration?(value); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#575 + def serialize(value); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#599 + def serializer; end +end + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#567 +ActionDispatch::Cookies::SerializedCookieJars::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#568 +ActionDispatch::Cookies::SerializedCookieJars::SERIALIZER = ActiveSupport::MessageEncryptor::NullSerializer + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#616 +class ActionDispatch::Cookies::SignedKeyRotatingCookieJar < ::ActionDispatch::Cookies::AbstractCookieJar + include ::ActionDispatch::Cookies::SerializedCookieJars + + # @return [SignedKeyRotatingCookieJar] a new instance of SignedKeyRotatingCookieJar + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#619 + def initialize(parent_jar); end + + private + + # @raise [CookieOverflow] + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#638 + def commit(name, options); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#632 + def parse(name, signed_message, purpose: T.unsafe(nil)); end +end + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#189 +ActionDispatch::Cookies::USE_AUTHENTICATED_COOKIE_ENCRYPTION = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#197 +ActionDispatch::Cookies::USE_COOKIES_WITH_METADATA = T.let(T.unsafe(nil), String) + +# This middleware is responsible for logging exceptions and +# showing a debugging page in case the request is local. +# +# source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#11 +class ActionDispatch::DebugExceptions + # @return [DebugExceptions] a new instance of DebugExceptions + # + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#19 + def initialize(app, routes_app = T.unsafe(nil), response_format = T.unsafe(nil), interceptors = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#26 + def call(env); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#176 + def api_request?(content_type); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#114 + def create_template(request, wrapper); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#43 + def invoke_interceptors(request, exception); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#152 + def log_array(logger, lines); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#133 + def log_error(request, wrapper); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#180 + def log_rescued_responses?(request); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#162 + def logger(request); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#129 + def render(status, body, format); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#54 + def render_exception(request, exception); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#90 + def render_for_api_request(content_type, wrapper); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#76 + def render_for_browser_request(request, wrapper); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#170 + def routes_inspector(exception); end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#166 + def stderr_logger; end + + class << self + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#12 + def interceptors; end + + # source://actionpack//lib/action_dispatch/middleware/debug_exceptions.rb#14 + def register_interceptor(object = T.unsafe(nil), &block); end + end +end + +# This middleware can be used to diagnose deadlocks in the autoload interlock. +# +# To use it, insert it near the top of the middleware stack, using +# config/application.rb: +# +# config.middleware.insert_before Rack::Sendfile, ActionDispatch::DebugLocks +# +# After restarting the application and re-triggering the deadlock condition, +# the route /rails/locks will show a summary of all threads currently +# known to the interlock, which lock level they are holding or awaiting, and +# their current backtrace. +# +# Generally a deadlock will be caused by the interlock conflicting with some +# other external lock or blocking I/O call. These cannot be automatically +# identified, but should be visible in the displayed backtraces. +# +# NOTE: The formatting and content of this middleware's output is intended for +# human consumption, and should be expected to change between releases. +# +# This middleware exposes operational details of the server, with no access +# control. It should only be enabled when in use, and removed thereafter. +# +# source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#25 +class ActionDispatch::DebugLocks + # @return [DebugLocks] a new instance of DebugLocks + # + # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#26 + def initialize(app, path = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#31 + def call(env); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#103 + def blocked_by?(victim, blocker, all_threads); end + + # source://actionpack//lib/action_dispatch/middleware/debug_locks.rb#45 + def render_details(req); end +end + +# source://actionpack//lib/action_dispatch/middleware/debug_view.rb#9 +class ActionDispatch::DebugView < ::ActionView::Base + # @return [DebugView] a new instance of DebugView + # + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#12 + def initialize(assigns); end + + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#18 + def compiled_method_container; end + + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#42 + def debug_hash(object); end + + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#34 + def debug_headers(headers); end + + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#22 + def debug_params(params); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#60 + def params_valid?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#56 + def protect_against_forgery?; end + + # source://actionpack//lib/action_dispatch/middleware/debug_view.rb#46 + def render(*_arg0); end +end + +# source://actionpack//lib/action_dispatch/middleware/debug_view.rb#10 +ActionDispatch::DebugView::RESCUES_TEMPLATE_PATH = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#7 +class ActionDispatch::ExceptionWrapper + # @return [ExceptionWrapper] a new instance of ExceptionWrapper + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#46 + def initialize(backtrace_cleaner, exception); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#77 + def application_trace; end + + # Returns the value of attribute backtrace_cleaner. + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#44 + def backtrace_cleaner; end + + # Returns the value of attribute exception. + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#44 + def exception; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#71 + def exception_trace; end + + # Returns the value of attribute file. + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#44 + def file; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#81 + def framework_trace; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#85 + def full_trace; end + + # Returns the value of attribute line_number. + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#44 + def line_number; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#121 + def rescue_response?; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#8 + def rescue_responses; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#8 + def rescue_responses=(val); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#63 + def rescue_template; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#26 + def rescue_templates; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#26 + def rescue_templates=(val); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 + def silent_exceptions; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 + def silent_exceptions=(val); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#125 + def source_extracts; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#144 + def source_to_show_id; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#67 + def status_code; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#136 + def trace_to_show; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#89 + def traces; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#55 + def unwrapped_exception; end + + # Returns the value of attribute wrapped_causes. + # + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#44 + def wrapped_causes; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#35 + def wrapper_exceptions; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#35 + def wrapper_exceptions=(val); end + + private + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#149 + def backtrace; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#153 + def causes_for(exception); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#163 + def clean_backtrace(*args); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#190 + def expand_backtrace; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#183 + def extract_file_and_line_number(trace); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#171 + def source_fragment(path, line); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#159 + def wrapped_causes_for(exception, backtrace_cleaner); end + + class << self + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#8 + def rescue_responses; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#8 + def rescue_responses=(val); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#26 + def rescue_templates; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#26 + def rescue_templates=(val); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 + def silent_exceptions; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#39 + def silent_exceptions=(val); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#117 + def status_code_for_exception(class_name); end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#35 + def wrapper_exceptions; end + + # source://actionpack//lib/action_dispatch/middleware/exception_wrapper.rb#35 + def wrapper_exceptions=(val); end + end +end + +# source://actionpack//lib/action_dispatch/middleware/executor.rb#6 +class ActionDispatch::Executor + # @return [Executor] a new instance of Executor + # + # source://actionpack//lib/action_dispatch/middleware/executor.rb#7 + def initialize(app, executor); end + + # source://actionpack//lib/action_dispatch/middleware/executor.rb#11 + def call(env); end +end + +# This endpoint serves static files from disk using Rack::File. +# +# URL paths are matched with static files according to expected +# conventions: +path+, +path+.html, +path+/index.html. +# +# Precompressed versions of these files are checked first. Brotli (.br) +# and gzip (.gz) files are supported. If +path+.br exists, this +# endpoint returns that file with a Content-Encoding: br header. +# +# If no matching file is found, this endpoint responds 404 Not Found. +# +# Pass the +root+ directory to search for matching files, an optional +# index: "index" to change the default +path+/index.html, and optional +# additional response headers. +# +# source://actionpack//lib/action_dispatch/middleware/static.rb#41 +class ActionDispatch::FileHandler + # @return [FileHandler] a new instance of FileHandler + # + # source://actionpack//lib/action_dispatch/middleware/static.rb#49 + def initialize(root, index: T.unsafe(nil), headers: T.unsafe(nil), precompressed: T.unsafe(nil), compressible_content_types: T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/static.rb#63 + def attempt(env); end + + # source://actionpack//lib/action_dispatch/middleware/static.rb#59 + def call(env); end + + private + + # source://actionpack//lib/action_dispatch/middleware/static.rb#179 + def clean_path(path_info); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/static.rb#143 + def compressible?(content_type); end + + # @yield [path, content_type || "text/plain"] + # + # source://actionpack//lib/action_dispatch/middleware/static.rb#156 + def each_candidate_filepath(path_info); end + + # source://actionpack//lib/action_dispatch/middleware/static.rb#147 + def each_precompressed_filepath(filepath); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/static.rb#138 + def file_readable?(path); end + + # Match a URI path to a static file to be served. + # + # Used by the +Static+ class to negotiate a servable file in the + # +public/+ directory (see Static#call). + # + # Checks for +path+, +path+.html, and +path+/index.html files, + # in that order, including .br and .gzip compressed extensions. + # + # If a matching file is found, the path and necessary response headers + # (Content-Type, Content-Encoding) are returned. + # + # source://actionpack//lib/action_dispatch/middleware/static.rb#98 + def find_file(path_info, accept_encoding:); end + + # source://actionpack//lib/action_dispatch/middleware/static.rb#74 + def serve(request, filepath, content_headers); end + + # source://actionpack//lib/action_dispatch/middleware/static.rb#106 + def try_files(filepath, content_type, accept_encoding:); end + + # source://actionpack//lib/action_dispatch/middleware/static.rb#116 + def try_precompressed_files(filepath, headers, accept_encoding:); end +end + +# Accept-Encoding value -> file extension +# +# source://actionpack//lib/action_dispatch/middleware/static.rb#43 +ActionDispatch::FileHandler::PRECOMPRESSED = T.let(T.unsafe(nil), Hash) + +# The flash provides a way to pass temporary primitive-types (String, Array, Hash) between actions. Anything you place in the flash will be exposed +# to the very next action and then cleared out. This is a great way of doing notices and alerts, such as a create +# action that sets flash[:notice] = "Post successfully created" before redirecting to a display action that can +# then expose the flash to its template. Actually, that exposure is automatically done. +# +# class PostsController < ActionController::Base +# def create +# # save post +# flash[:notice] = "Post successfully created" +# redirect_to @post +# end +# +# def show +# # doesn't need to assign the flash notice to the template, that's done automatically +# end +# end +# +# Then in +show.html.erb+: +# +# <% if flash[:notice] %> +#
<%= flash[:notice] %>
+# <% end %> +# +# Since the +notice+ and +alert+ keys are a common idiom, convenience accessors are available: +# +# flash.alert = "You must be logged in" +# flash.notice = "Post successfully created" +# +# This example places a string in the flash. And of course, you can put as many as you like at a time too. If you want to pass +# non-primitive types, you will have to handle that in your application. Example: To show messages with links, you will have to +# use sanitize helper. +# +# Just remember: They'll be gone by the time the next action has been performed. +# +# See docs on the FlashHash class for more details about the flash. +# +# source://actionpack//lib/action_dispatch/middleware/flash.rb#41 +class ActionDispatch::Flash + class << self + # source://actionpack//lib/action_dispatch/middleware/flash.rb#293 + def new(app); end + end +end + +# source://actionpack//lib/action_dispatch/middleware/flash.rb#110 +class ActionDispatch::Flash::FlashHash + include ::Enumerable + + # @return [FlashHash] a new instance of FlashHash + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#140 + def initialize(flashes = T.unsafe(nil), discard = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#160 + def [](k); end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#154 + def []=(k, v); end + + # Convenience accessor for flash[:alert]. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#261 + def alert; end + + # Convenience accessor for flash[:alert]=. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#266 + def alert=(message); end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#193 + def clear; end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#178 + def delete(key); end + + # Marks the entire flash or a single flash entry to be discarded by the end of the current action: + # + # flash.discard # discard the entire flash at the end of the current action + # flash.discard(:warning) # discard only the "warning" entry at the end of the current action + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#246 + def discard(k = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#198 + def each(&block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#189 + def empty?; end + + # Keeps either the entire current flash or a specific flash entry available for the next action: + # + # flash.keep # keeps the entire flash + # flash.keep(:notice) # keeps only the "notice" entry, the rest of the flash is discarded + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#236 + def keep(k = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#174 + def key?(name); end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#170 + def keys; end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#164 + def merge!(h); end + + # Convenience accessor for flash[:notice]. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#271 + def notice; end + + # Convenience accessor for flash[:notice]=. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#276 + def notice=(message); end + + # Sets a flash that will not be available to the next action, only to the current. + # + # flash.now[:message] = "Hello current action" + # + # This method enables you to use the flash as a central messaging system in your app. + # When you need to pass an object to the next action, you use the standard flash assign ([]=). + # When you need to pass an object to the current action, you use now, and your object will + # vanish when the current action is done. + # + # Entries set via now are accessed the same way as standard entries: flash['my-key']. + # + # Also, brings two convenience accessors: + # + # flash.now.alert = "Beware now!" + # # Equivalent to flash.now[:alert] = "Beware now!" + # + # flash.now.notice = "Good luck now!" + # # Equivalent to flash.now[:notice] = "Good luck now!" + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#228 + def now; end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#204 + def replace(h); end + + # Mark for removal entries that were kept, and delete unkept ones. + # + # This method is called automatically by filters, so you generally don't need to care about it. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#255 + def sweep; end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#185 + def to_hash; end + + # Builds a hash containing the flashes to keep for the next request. + # If there are none to keep, returns +nil+. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#134 + def to_session_value; end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#164 + def update(h); end + + protected + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#281 + def now_is_loaded?; end + + private + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#146 + def initialize_copy(other); end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#286 + def stringify_array(array); end + + class << self + # source://actionpack//lib/action_dispatch/middleware/flash.rb#113 + def from_session_value(value); end + end +end + +# source://actionpack//lib/action_dispatch/middleware/flash.rb#81 +class ActionDispatch::Flash::FlashNow + # @return [FlashNow] a new instance of FlashNow + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#84 + def initialize(flash); end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#95 + def [](k); end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#88 + def []=(k, v); end + + # Convenience accessor for flash.now[:alert]=. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#100 + def alert=(message); end + + # Returns the value of attribute flash. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#82 + def flash; end + + # Sets the attribute flash + # + # @param value the value to set the attribute flash to. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#82 + def flash=(_arg0); end + + # Convenience accessor for flash.now[:notice]=. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#105 + def notice=(message); end +end + +# source://actionpack//lib/action_dispatch/middleware/flash.rb#42 +ActionDispatch::Flash::KEY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/flash.rb#44 +module ActionDispatch::Flash::RequestMethods + # source://actionpack//lib/action_dispatch/middleware/flash.rb#62 + def commit_flash; end + + # Access the contents of the flash. Returns a ActionDispatch::Flash::FlashHash. + # + # See ActionDispatch::Flash for example usage. + # + # source://actionpack//lib/action_dispatch/middleware/flash.rb#48 + def flash; end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#54 + def flash=(flash); end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#58 + def flash_hash; end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#75 + def reset_session; end +end + +# This middleware guards from DNS rebinding attacks by explicitly permitting +# the hosts a request can be sent to, and is passed the options set in +# +config.host_authorization+. +# +# Requests can opt-out of Host Authorization with +exclude+: +# +# config.host_authorization = { exclude: ->(request) { request.path =~ /healthcheck/ } } +# +# When a request comes to an unauthorized host, the +response_app+ +# application will be executed and rendered. If no +response_app+ is given, a +# default one will run. +# The default response app logs blocked host info with level 'error' and +# responds with 403 Forbidden. The body of the response contains debug info +# if +config.consider_all_requests_local+ is set to true, otherwise the body is empty. +# +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#18 +class ActionDispatch::HostAuthorization + # @return [HostAuthorization] a new instance of HostAuthorization + # + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#122 + def initialize(app, hosts, exclude: T.unsafe(nil), response_app: T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#130 + def call(env); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#144 + def authorized?(request); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#151 + def excluded?(request); end + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#155 + def mark_as_authorized(request); end +end + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#19 +ActionDispatch::HostAuthorization::ALLOWED_HOSTS_IN_DEVELOPMENT = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#83 +class ActionDispatch::HostAuthorization::DefaultResponseApp + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#86 + def call(env); end + + private + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#117 + def available_logger(request); end + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#109 + def log_error(request); end + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#102 + def response(format, body); end + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#95 + def response_body(request); end +end + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#84 +ActionDispatch::HostAuthorization::DefaultResponseApp::RESPONSE_STATUS = T.let(T.unsafe(nil), Integer) + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#21 +ActionDispatch::HostAuthorization::IPV4_HOSTNAME = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#22 +ActionDispatch::HostAuthorization::IPV6_HOSTNAME = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#23 +ActionDispatch::HostAuthorization::IPV6_HOSTNAME_WITH_PORT = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#20 +ActionDispatch::HostAuthorization::PORT_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#30 +class ActionDispatch::HostAuthorization::Permissions + # @return [Permissions] a new instance of Permissions + # + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#31 + def initialize(hosts); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#39 + def allows?(host); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#35 + def empty?; end + + private + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#78 + def extract_hostname(host); end + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#56 + def sanitize_hosts(hosts); end + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#66 + def sanitize_regexp(host); end + + # source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#70 + def sanitize_string(host); end +end + +# source://actionpack//lib/action_dispatch/middleware/host_authorization.rb#24 +ActionDispatch::HostAuthorization::VALID_IP_HOSTNAME = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch.rb#80 +module ActionDispatch::Http + extend ::ActiveSupport::Autoload +end + +# source://actionpack//lib/action_dispatch/http/cache.rb#5 +module ActionDispatch::Http::Cache; end + +# source://actionpack//lib/action_dispatch/http/cache.rb#6 +module ActionDispatch::Http::Cache::Request + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/cache.rb#28 + def etag_matches?(etag); end + + # Check response freshness (Last-Modified and ETag) against request + # If-Modified-Since and If-None-Match conditions. If both headers are + # supplied, both must match, or the request is not considered fresh. + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/cache.rb#38 + def fresh?(response); end + + # source://actionpack//lib/action_dispatch/http/cache.rb#10 + def if_modified_since; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#16 + def if_none_match; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#20 + def if_none_match_etags; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/cache.rb#24 + def not_modified?(modified_at); end +end + +# source://actionpack//lib/action_dispatch/http/cache.rb#7 +ActionDispatch::Http::Cache::Request::HTTP_IF_MODIFIED_SINCE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#8 +ActionDispatch::Http::Cache::Request::HTTP_IF_NONE_MATCH = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#51 +module ActionDispatch::Http::Cache::Response + # Returns the value of attribute cache_control. + # + # source://actionpack//lib/action_dispatch/http/cache.rb#52 + def cache_control; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#68 + def date; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#78 + def date=(utc_time); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/cache.rb#74 + def date?; end + + # This method sets a weak ETag validator on the response so browsers + # and proxies may cache the response, keyed on the ETag. On subsequent + # requests, the If-None-Match header is set to the cached ETag. If it + # matches the current ETag, we can return a 304 Not Modified response + # with no body, letting the browser or proxy know that their cache is + # current. Big savings in request time and network bandwidth. + # + # Weak ETags are considered to be semantically equivalent but not + # byte-for-byte identical. This is perfect for browser caching of HTML + # pages where we don't care about exact equality, just what the user + # is viewing. + # + # Strong ETags are considered byte-for-byte identical. They allow a + # browser or proxy cache to support Range requests, useful for paging + # through a PDF file or scrubbing through a video. Some CDNs only + # support strong ETags and will ignore weak ETags entirely. + # + # Weak ETags are what we almost always need, so they're the default. + # Check out #strong_etag= to provide a strong ETag validator. + # + # source://actionpack//lib/action_dispatch/http/cache.rb#101 + def etag=(weak_validators); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/cache.rb#113 + def etag?; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#54 + def last_modified; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#64 + def last_modified=(utc_time); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/cache.rb#60 + def last_modified?; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#109 + def strong_etag=(strong_validators); end + + # True if an ETag is set and it isn't a weak validator (not preceded with W/) + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/cache.rb#121 + def strong_etag?; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#105 + def weak_etag=(weak_validators); end + + # True if an ETag is set and it's a weak validator (preceded with W/) + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/cache.rb#116 + def weak_etag?; end + + private + + # source://actionpack//lib/action_dispatch/http/cache.rb#146 + def cache_control_headers; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#138 + def cache_control_segments; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#134 + def generate_strong_etag(validators); end + + # source://actionpack//lib/action_dispatch/http/cache.rb#130 + def generate_weak_etag(validators); end + + # source://actionpack//lib/action_dispatch/http/cache.rb#175 + def handle_conditional_get!; end + + # source://actionpack//lib/action_dispatch/http/cache.rb#185 + def merge_and_normalize_cache_control!(cache_control); end + + # source://actionpack//lib/action_dispatch/http/cache.rb#164 + def prepare_cache_control!; end +end + +# source://actionpack//lib/action_dispatch/http/cache.rb#126 +ActionDispatch::Http::Cache::Response::DATE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#168 +ActionDispatch::Http::Cache::Response::DEFAULT_CACHE_CONTROL = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#127 +ActionDispatch::Http::Cache::Response::LAST_MODIFIED = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#173 +ActionDispatch::Http::Cache::Response::MUST_REVALIDATE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#170 +ActionDispatch::Http::Cache::Response::NO_CACHE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#169 +ActionDispatch::Http::Cache::Response::NO_STORE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#172 +ActionDispatch::Http::Cache::Response::PRIVATE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#171 +ActionDispatch::Http::Cache::Response::PUBLIC = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/cache.rb#128 +ActionDispatch::Http::Cache::Response::SPECIAL_KEYS = T.let(T.unsafe(nil), Set) + +# source://actionpack//lib/action_dispatch/http/content_disposition.rb#5 +class ActionDispatch::Http::ContentDisposition + # @return [ContentDisposition] a new instance of ContentDisposition + # + # source://actionpack//lib/action_dispatch/http/content_disposition.rb#12 + def initialize(disposition:, filename:); end + + # source://actionpack//lib/action_dispatch/http/content_disposition.rb#19 + def ascii_filename; end + + # Returns the value of attribute disposition. + # + # source://actionpack//lib/action_dispatch/http/content_disposition.rb#10 + def disposition; end + + # Returns the value of attribute filename. + # + # source://actionpack//lib/action_dispatch/http/content_disposition.rb#10 + def filename; end + + # source://actionpack//lib/action_dispatch/http/content_disposition.rb#29 + def to_s; end + + # source://actionpack//lib/action_dispatch/http/content_disposition.rb#25 + def utf8_filename; end + + private + + # source://actionpack//lib/action_dispatch/http/content_disposition.rb#38 + def percent_escape(string, pattern); end + + class << self + # source://actionpack//lib/action_dispatch/http/content_disposition.rb#6 + def format(disposition:, filename:); end + end +end + +# source://actionpack//lib/action_dispatch/http/content_disposition.rb#23 +ActionDispatch::Http::ContentDisposition::RFC_5987_ESCAPED_CHAR = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/http/content_disposition.rb#17 +ActionDispatch::Http::ContentDisposition::TRADITIONAL_ESCAPED_CHAR = T.let(T.unsafe(nil), Regexp) + +# Allows you to specify sensitive parameters which will be replaced from +# the request log by looking in the query string of the request and all +# sub-hashes of the params hash to filter. Filtering only certain sub-keys +# from a hash is possible by using the dot notation: 'credit_card.number'. +# If a block is given, each key and value of the params hash and all +# sub-hashes are passed to it, where the value or the key can be replaced using +# String#replace or similar methods. +# +# env["action_dispatch.parameter_filter"] = [:password] +# => replaces the value to all keys matching /password/i with "[FILTERED]" +# +# env["action_dispatch.parameter_filter"] = [:foo, "bar"] +# => replaces the value to all keys matching /foo|bar/i with "[FILTERED]" +# +# env["action_dispatch.parameter_filter"] = [ /\Apin\z/i, /\Apin_/i ] +# => replaces the value for the exact (case-insensitive) key 'pin' and all +# (case-insensitive) keys beginning with 'pin_', with "[FILTERED]" +# Does not match keys with 'pin' as a substring, such as 'shipping_id'. +# +# env["action_dispatch.parameter_filter"] = [ "credit_card.code" ] +# => replaces { credit_card: {code: "xxxx"} } with "[FILTERED]", does not +# change { file: { code: "xxxx"} } +# +# env["action_dispatch.parameter_filter"] = -> (k, v) do +# v.reverse! if k.match?(/secret/i) +# end +# => reverses the value to all keys matching /secret/i +# +# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#34 +module ActionDispatch::Http::FilterParameters + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#39 + def initialize; end + + # Returns a hash of request.env with all sensitive data replaced. + # + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#54 + def filtered_env; end + + # Returns a hash of parameters with all sensitive data replaced. + # + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#47 + def filtered_parameters; end + + # Reconstructs a path with all sensitive GET parameters replaced. + # + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#59 + def filtered_path; end + + private + + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#70 + def env_filter; end + + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#83 + def filtered_query_string; end + + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#64 + def parameter_filter; end + + # source://actionpack//lib/action_dispatch/http/filter_parameters.rb#77 + def parameter_filter_for(filters); end +end + +# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#35 +ActionDispatch::Http::FilterParameters::ENV_MATCH = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#81 +ActionDispatch::Http::FilterParameters::KV_RE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#37 +ActionDispatch::Http::FilterParameters::NULL_ENV_FILTER = T.let(T.unsafe(nil), ActiveSupport::ParameterFilter) + +# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#36 +ActionDispatch::Http::FilterParameters::NULL_PARAM_FILTER = T.let(T.unsafe(nil), ActiveSupport::ParameterFilter) + +# source://actionpack//lib/action_dispatch/http/filter_parameters.rb#82 +ActionDispatch::Http::FilterParameters::PAIR_RE = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/http/filter_redirect.rb#5 +module ActionDispatch::Http::FilterRedirect + # source://actionpack//lib/action_dispatch/http/filter_redirect.rb#8 + def filtered_location; end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/filter_redirect.rb#25 + def location_filter_match?; end + + # source://actionpack//lib/action_dispatch/http/filter_redirect.rb#17 + def location_filters; end +end + +# source://actionpack//lib/action_dispatch/http/filter_redirect.rb#6 +ActionDispatch::Http::FilterRedirect::FILTERED = T.let(T.unsafe(nil), String) + +# Provides access to the request's HTTP headers from the environment. +# +# env = { "CONTENT_TYPE" => "text/plain", "HTTP_USER_AGENT" => "curl/7.43.0" } +# headers = ActionDispatch::Http::Headers.from_hash(env) +# headers["Content-Type"] # => "text/plain" +# headers["User-Agent"] # => "curl/7.43.0" +# +# Also note that when headers are mapped to CGI-like variables by the Rack +# server, both dashes and underscores are converted to underscores. This +# ambiguity cannot be resolved at this stage anymore. Both underscores and +# dashes have to be interpreted as if they were originally sent as dashes. +# +# # GET / HTTP/1.1 +# # ... +# # User-Agent: curl/7.43.0 +# # X_Custom_Header: token +# +# headers["X_Custom_Header"] # => nil +# headers["X-Custom-Header"] # => "token" +# +# source://actionpack//lib/action_dispatch/http/headers.rb#24 +class ActionDispatch::Http::Headers + include ::Enumerable + + # @return [Headers] a new instance of Headers + # + # source://actionpack//lib/action_dispatch/http/headers.rb#54 + def initialize(request); end + + # Returns the value for the given key mapped to @env. + # + # source://actionpack//lib/action_dispatch/http/headers.rb#59 + def [](key); end + + # Sets the given value for the key mapped to @env. + # + # source://actionpack//lib/action_dispatch/http/headers.rb#64 + def []=(key, value); end + + # Add a value to a multivalued header like Vary or Accept-Encoding. + # + # source://actionpack//lib/action_dispatch/http/headers.rb#69 + def add(key, value); end + + # source://actionpack//lib/action_dispatch/http/headers.rb#95 + def each(&block); end + + # source://actionpack//lib/action_dispatch/http/headers.rb#116 + def env; end + + # Returns the value for the given key mapped to @env. + # + # If the key is not found and an optional code block is not provided, + # raises a KeyError exception. + # + # If the code block is provided, then it will be run and + # its result returned. + # + # source://actionpack//lib/action_dispatch/http/headers.rb#87 + def fetch(key, default = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/headers.rb#73 + def include?(key); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/headers.rb#73 + def key?(key); end + + # Returns a new Http::Headers instance containing the contents of + # headers_or_env and the original instance. + # + # source://actionpack//lib/action_dispatch/http/headers.rb#101 + def merge(headers_or_env); end + + # Adds the contents of headers_or_env to original instance + # entries; duplicate keys are overwritten with the values from + # headers_or_env. + # + # source://actionpack//lib/action_dispatch/http/headers.rb#110 + def merge!(headers_or_env); end + + private + + # Converts an HTTP header name to an environment variable name if it is + # not contained within the headers hash. + # + # source://actionpack//lib/action_dispatch/http/headers.rb#121 + def env_name(key); end + + class << self + # source://actionpack//lib/action_dispatch/http/headers.rb#50 + def from_hash(hash); end + end +end + +# source://actionpack//lib/action_dispatch/http/headers.rb#25 +ActionDispatch::Http::Headers::CGI_VARIABLES = T.let(T.unsafe(nil), Set) + +# source://actionpack//lib/action_dispatch/http/headers.rb#78 +ActionDispatch::Http::Headers::DEFAULT = T.let(T.unsafe(nil), Object) + +# source://actionpack//lib/action_dispatch/http/headers.rb#46 +ActionDispatch::Http::Headers::HTTP_HEADER = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#7 +module ActionDispatch::Http::MimeNegotiation + extend ::ActiveSupport::Concern + + # Returns the accepted MIME type for the request. + # + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#54 + def accepts; end + + # The MIME type of the HTTP request, such as Mime[:xml]. + # + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#23 + def content_mime_type; end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#36 + def content_type; end + + # Returns the MIME type for the \format used in the request. + # + # GET /posts/5.xml | request.format => Mime[:xml] + # GET /posts/5.xhtml | request.format => Mime[:html] + # GET /posts/5 | request.format => Mime[:html] or Mime[:js], or request.accepts.first + # + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#75 + def format(view_path = T.unsafe(nil)); end + + # Sets the \format by string extension, which can be used to force custom formats + # that are not controlled by the extension. + # + # class ApplicationController < ActionController::Base + # before_action :adjust_format_for_iphone + # + # private + # def adjust_format_for_iphone + # request.format = :iphone if request.env["HTTP_USER_AGENT"][/iPhone/] + # end + # end + # + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#127 + def format=(extension); end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#79 + def formats; end + + # Sets the \formats by string extensions. This differs from #format= by allowing you + # to set multiple, ordered formats, which is useful when you want to have a fallback. + # + # In this example, the +:iphone+ format will be used if it's available, otherwise it'll fallback + # to the +:html+ format. + # + # class ApplicationController < ActionController::Base + # before_action :adjust_format_for_iphone_with_html_fallback + # + # private + # def adjust_format_for_iphone_with_html_fallback + # request.formats = [ :iphone, :html ] if request.env["HTTP_USER_AGENT"][/iPhone/] + # end + # end + # + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#146 + def formats=(extensions); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#49 + def has_content_type?; end + + # Returns the first MIME type that matches the provided array of MIME types. + # + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#154 + def negotiate_mime(order); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#166 + def should_apply_vary_header?; end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#112 + def variant; end + + # Sets the \variant for template. + # + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#102 + def variant=(variant); end + + private + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#190 + def format_from_path_extension; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#175 + def params_readable?; end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#186 + def use_accept_header; end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#181 + def valid_accept_header; end +end + +# We use normal content negotiation unless you include */* in your list, +# in which case we assume you're a browser and send HTML. +# +# source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#173 +ActionDispatch::Http::MimeNegotiation::BROWSER_LIKE_ACCEPTS = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#10 +class ActionDispatch::Http::MimeNegotiation::InvalidType < ::Mime::Type::InvalidMimeType; end + +# source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#12 +ActionDispatch::Http::MimeNegotiation::RESCUABLE_MIME_FORMAT_ERRORS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/parameters.rb#5 +module ActionDispatch::Http::Parameters + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionDispatch::Http::Parameters::ClassMethods + + # Returns both GET and POST \parameters in a single hash. + # + # source://actionpack//lib/action_dispatch/http/parameters.rb#50 + def parameters; end + + # Returns both GET and POST \parameters in a single hash. + # + # source://actionpack//lib/action_dispatch/http/parameters.rb#50 + def params; end + + # Returns a hash with the \parameters used to form the \path of the request. + # Returned hash keys are strings: + # + # { action: "my_action", controller: "my_controller" } + # + # source://actionpack//lib/action_dispatch/http/parameters.rb#82 + def path_parameters; end + + # source://actionpack//lib/action_dispatch/http/parameters.rb#65 + def path_parameters=(parameters); end + + private + + # source://actionpack//lib/action_dispatch/http/parameters.rb#100 + def log_parse_error_once; end + + # source://actionpack//lib/action_dispatch/http/parameters.rb#112 + def params_parsers; end + + # source://actionpack//lib/action_dispatch/http/parameters.rb#87 + def parse_formatted_parameters(parsers); end +end + +# source://actionpack//lib/action_dispatch/http/parameters.rb#34 +module ActionDispatch::Http::Parameters::ClassMethods + # Configure the parameter parser for a given MIME type. + # + # It accepts a hash where the key is the symbol of the MIME type + # and the value is a proc. + # + # original_parsers = ActionDispatch::Request.parameter_parsers + # xml_parser = -> (raw_post) { Hash.from_xml(raw_post) || {} } + # new_parsers = original_parsers.merge(xml: xml_parser) + # ActionDispatch::Request.parameter_parsers = new_parsers + # + # source://actionpack//lib/action_dispatch/http/parameters.rb#44 + def parameter_parsers=(parsers); end +end + +# source://actionpack//lib/action_dispatch/http/parameters.rb#10 +ActionDispatch::Http::Parameters::DEFAULT_PARSERS = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/http/parameters.rb#8 +ActionDispatch::Http::Parameters::PARAMETERS_KEY = T.let(T.unsafe(nil), String) + +# Raised when raw data from the request cannot be parsed by the parser +# defined for request's content MIME type. +# +# source://actionpack//lib/action_dispatch/http/parameters.rb#19 +class ActionDispatch::Http::Parameters::ParseError < ::StandardError + # @return [ParseError] a new instance of ParseError + # + # source://actionpack//lib/action_dispatch/http/parameters.rb#20 + def initialize(message = T.unsafe(nil)); end +end + +# source://actionpack//lib/action_dispatch/http/url.rb#7 +module ActionDispatch::Http::URL + # source://actionpack//lib/action_dispatch/http/url.rb#179 + def initialize; end + + # Returns the \domain part of a \host, such as "rubyonrails.org" in "www.rubyonrails.org". You can specify + # a different tld_length, such as 2 to catch rubyonrails.co.uk in "www.rubyonrails.co.uk". + # + # source://actionpack//lib/action_dispatch/http/url.rb#321 + def domain(tld_length = T.unsafe(nil)); end + + # Returns the host for this request, such as "example.com". + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.host # => "example.com" + # + # source://actionpack//lib/action_dispatch/http/url.rb#226 + def host; end + + # Returns a \host:\port string for this request, such as "example.com" or + # "example.com:8080". Port is only included if it is not a default port + # (80 or 443) + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' + # req.host_with_port # => "example.com" + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' + # req.host_with_port # => "example.com" + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.host_with_port # => "example.com:8080" + # + # source://actionpack//lib/action_dispatch/http/url.rb#242 + def host_with_port; end + + # Returns a number \port suffix like 8080 if the \port number of this request + # is not the default HTTP \port 80 or HTTPS \port 443. + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' + # req.optional_port # => nil + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.optional_port # => 8080 + # + # source://actionpack//lib/action_dispatch/http/url.rb#292 + def optional_port; end + + # Returns the port number of this request as an integer. + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' + # req.port # => 80 + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.port # => 8080 + # + # source://actionpack//lib/action_dispatch/http/url.rb#253 + def port; end + + # Returns a string \port suffix, including colon, like ":8080" if the \port + # number of this request is not the default HTTP \port 80 or HTTPS \port 443. + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' + # req.port_string # => "" + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.port_string # => ":8080" + # + # source://actionpack//lib/action_dispatch/http/url.rb#304 + def port_string; end + + # Returns 'https://' if this is an SSL request and 'http://' otherwise. + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' + # req.protocol # => "http://" + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com', 'HTTPS' => 'on' + # req.protocol # => "https://" + # + # source://actionpack//lib/action_dispatch/http/url.rb#200 + def protocol; end + + # Returns the \host and port for this request, such as "example.com:8080". + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' + # req.raw_host_with_port # => "example.com" + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' + # req.raw_host_with_port # => "example.com:80" + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.raw_host_with_port # => "example.com:8080" + # + # source://actionpack//lib/action_dispatch/http/url.rb#214 + def raw_host_with_port; end + + # source://actionpack//lib/action_dispatch/http/url.rb#12 + def secure_protocol; end + + # source://actionpack//lib/action_dispatch/http/url.rb#12 + def secure_protocol=(val); end + + # Returns the requested port, such as 8080, based on SERVER_PORT + # + # req = ActionDispatch::Request.new 'SERVER_PORT' => '80' + # req.server_port # => 80 + # + # req = ActionDispatch::Request.new 'SERVER_PORT' => '8080' + # req.server_port # => 8080 + # + # source://actionpack//lib/action_dispatch/http/url.rb#315 + def server_port; end + + # Returns the standard \port number for this request's protocol. + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.standard_port # => 80 + # + # source://actionpack//lib/action_dispatch/http/url.rb#265 + def standard_port; end + + # Returns whether this request is using the standard port + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' + # req.standard_port? # => true + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.standard_port? # => false + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/url.rb#280 + def standard_port?; end + + # Returns all the \subdomains as a string, so "dev.www" would be + # returned for "dev.www.rubyonrails.org". You can specify a different tld_length, + # such as 2 to catch "www" instead of "www.rubyonrails" + # in "www.rubyonrails.co.uk". + # + # source://actionpack//lib/action_dispatch/http/url.rb#337 + def subdomain(tld_length = T.unsafe(nil)); end + + # Returns all the \subdomains as an array, so ["dev", "www"] would be + # returned for "dev.www.rubyonrails.org". You can specify a different tld_length, + # such as 2 to catch ["www"] instead of ["www", "rubyonrails"] + # in "www.rubyonrails.co.uk". + # + # source://actionpack//lib/action_dispatch/http/url.rb#329 + def subdomains(tld_length = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/url.rb#13 + def tld_length; end + + # source://actionpack//lib/action_dispatch/http/url.rb#13 + def tld_length=(val); end + + # Returns the complete URL used for this request. + # + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' + # req.url # => "http://example.com" + # + # source://actionpack//lib/action_dispatch/http/url.rb#189 + def url; end + + class << self + # Returns the domain part of a host given the domain level. + # + # # Top-level domain example + # extract_domain('www.example.com', 1) # => "example.com" + # # Second-level domain example + # extract_domain('dev.www.example.co.uk', 2) # => "example.co.uk" + # + # source://actionpack//lib/action_dispatch/http/url.rb#22 + def extract_domain(host, tld_length); end + + # Returns the subdomains of a host as a String given the domain level. + # + # # Top-level domain example + # extract_subdomain('www.example.com', 1) # => "www" + # # Second-level domain example + # extract_subdomain('dev.www.example.co.uk', 2) # => "dev.www" + # + # source://actionpack//lib/action_dispatch/http/url.rb#46 + def extract_subdomain(host, tld_length); end + + # Returns the subdomains of a host as an Array given the domain level. + # + # # Top-level domain example + # extract_subdomains('www.example.com', 1) # => ["www"] + # # Second-level domain example + # extract_subdomains('dev.www.example.co.uk', 2) # => ["dev", "www"] + # + # source://actionpack//lib/action_dispatch/http/url.rb#32 + def extract_subdomains(host, tld_length); end + + # source://actionpack//lib/action_dispatch/http/url.rb#58 + def full_url_for(options); end + + # source://actionpack//lib/action_dispatch/http/url.rb#70 + def path_for(options); end + + # source://actionpack//lib/action_dispatch/http/url.rb#12 + def secure_protocol; end + + # source://actionpack//lib/action_dispatch/http/url.rb#12 + def secure_protocol=(val); end + + # source://actionpack//lib/action_dispatch/http/url.rb#13 + def tld_length; end + + # source://actionpack//lib/action_dispatch/http/url.rb#13 + def tld_length=(val); end + + # source://actionpack//lib/action_dispatch/http/url.rb#50 + def url_for(options); end + + private + + # source://actionpack//lib/action_dispatch/http/url.rb#90 + def add_anchor(path, anchor); end + + # source://actionpack//lib/action_dispatch/http/url.rb#83 + def add_params(path, params); end + + # source://actionpack//lib/action_dispatch/http/url.rb#105 + def build_host_url(host, port, protocol, options, path); end + + # source://actionpack//lib/action_dispatch/http/url.rb#96 + def extract_domain_from(host, tld_length); end + + # source://actionpack//lib/action_dispatch/http/url.rb#100 + def extract_subdomains_from(host, tld_length); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/url.rb#129 + def named_host?(host); end + + # source://actionpack//lib/action_dispatch/http/url.rb#146 + def normalize_host(_host, options); end + + # source://actionpack//lib/action_dispatch/http/url.rb#166 + def normalize_port(port, protocol); end + + # source://actionpack//lib/action_dispatch/http/url.rb#133 + def normalize_protocol(protocol); end + end +end + +# source://actionpack//lib/action_dispatch/http/url.rb#9 +ActionDispatch::Http::URL::HOST_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/http/url.rb#8 +ActionDispatch::Http::URL::IP_HOST_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/http/url.rb#10 +ActionDispatch::Http::URL::PROTOCOL_REGEXP = T.let(T.unsafe(nil), Regexp) + +# Models uploaded files. +# +# The actual file is accessible via the +tempfile+ accessor, though some +# of its interface is available directly for convenience. +# +# Uploaded files are temporary files whose lifespan is one request. When +# the object is finalized Ruby unlinks the file, so there is no need to +# clean them with a separate maintenance task. +# +# source://actionpack//lib/action_dispatch/http/upload.rb#13 +class ActionDispatch::Http::UploadedFile + # @raise [ArgumentError] + # @return [UploadedFile] a new instance of UploadedFile + # + # source://actionpack//lib/action_dispatch/http/upload.rb#27 + def initialize(hash); end + + # Shortcut for +tempfile.close+. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#58 + def close(unlink_now = T.unsafe(nil)); end + + # A string with the MIME type of the file. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#18 + def content_type; end + + # A string with the MIME type of the file. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#18 + def content_type=(_arg0); end + + # Shortcut for +tempfile.eof?+. + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/upload.rb#83 + def eof?; end + + # A string with the headers of the multipart request. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#25 + def headers; end + + # A string with the headers of the multipart request. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#25 + def headers=(_arg0); end + + # Shortcut for +tempfile.open+. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#53 + def open; end + + # The basename of the file in the client. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#15 + def original_filename; end + + # The basename of the file in the client. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#15 + def original_filename=(_arg0); end + + # Shortcut for +tempfile.path+. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#63 + def path; end + + # Shortcut for +tempfile.read+. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#48 + def read(length = T.unsafe(nil), buffer = T.unsafe(nil)); end + + # Shortcut for +tempfile.rewind+. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#73 + def rewind; end + + # Shortcut for +tempfile.size+. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#78 + def size; end + + # A +Tempfile+ object with the actual uploaded file. Note that some of + # its interface is available directly. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#22 + def tempfile; end + + # A +Tempfile+ object with the actual uploaded file. Note that some of + # its interface is available directly. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#22 + def tempfile=(_arg0); end + + # source://actionpack//lib/action_dispatch/http/upload.rb#87 + def to_io; end + + # Shortcut for +tempfile.to_path+. + # + # source://actionpack//lib/action_dispatch/http/upload.rb#68 + def to_path; end +end + +# source://actionpack//lib/action_dispatch.rb#40 +class ActionDispatch::IllegalStateError < ::StandardError; end + +# source://actionpack//lib/action_dispatch/testing/integration.rb#11 +module ActionDispatch::Integration; end + +# source://actionpack//lib/action_dispatch/testing/integration.rb#12 +module ActionDispatch::Integration::RequestHelpers + # Performs a DELETE request with the given parameters. See ActionDispatch::Integration::Session#process + # for more details. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#39 + def delete(path, **args); end + + # Follow a single redirect response. If the last response was not a + # redirect, an exception will be raised. Otherwise, the redirect is + # performed on the location header. If the redirection is a 307 or 308 redirect, + # the same HTTP verb will be used when redirecting, otherwise a GET request + # will be performed. Any arguments are passed to the + # underlying request. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#61 + def follow_redirect!(**args); end + + # Performs a GET request with the given parameters. See ActionDispatch::Integration::Session#process + # for more details. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#15 + def get(path, **args); end + + # Performs a HEAD request with the given parameters. See ActionDispatch::Integration::Session#process + # for more details. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#45 + def head(path, **args); end + + # Performs an OPTIONS request with the given parameters. See ActionDispatch::Integration::Session#process + # for more details. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#51 + def options(path, **args); end + + # Performs a PATCH request with the given parameters. See ActionDispatch::Integration::Session#process + # for more details. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#27 + def patch(path, **args); end + + # Performs a POST request with the given parameters. See ActionDispatch::Integration::Session#process + # for more details. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#21 + def post(path, **args); end + + # Performs a PUT request with the given parameters. See ActionDispatch::Integration::Session#process + # for more details. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#33 + def put(path, **args); end +end + +# source://actionpack//lib/action_dispatch/testing/integration.rb#316 +module ActionDispatch::Integration::Runner + include ::ActionDispatch::Assertions::ResponseAssertions + include ::ActionDispatch::Assertions::RoutingAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::ActionDispatch::Assertions + + # source://actionpack//lib/action_dispatch/testing/integration.rb#324 + def initialize(*args, &blk); end + + # Returns the value of attribute app. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#321 + def app; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#395 + def assertions; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#399 + def assertions=(assertions); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#367 + def assigns(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#329 + def before_setup; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#367 + def cookies(*_arg0, **_arg1, &_arg2); end + + # Copy the instance variables from the current session instance into the + # test instance. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#405 + def copy_session_variables!; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#344 + def create_session(app); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#411 + def default_url_options; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#415 + def default_url_options=(options); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#367 + def delete(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#367 + def follow_redirect!(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#367 + def get(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#367 + def head(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#334 + def integration_session; end + + # Open a new session instance. If a block is given, the new session is + # yielded to the block before being returned. + # + # session = open_session do |sess| + # sess.extend(CustomAssertions) + # end + # + # By default, a single session is automatically created for you, but you + # can use this method to open multiple sessions that ought to be tested + # simultaneously. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#387 + def open_session; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#367 + def patch(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#367 + def post(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#367 + def put(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#356 + def remove!; end + + # Reset the current session. This is useful for testing multiple sessions + # in a single test case. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#340 + def reset!; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#322 + def root_session; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#322 + def root_session=(_arg0); end + + private + + # Delegate unhandled messages to the current session instance. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#425 + def method_missing(method, *args, **_arg2, &block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#420 + def respond_to_missing?(method, _); end +end + +# source://actionpack//lib/action_dispatch/testing/integration.rb#319 +ActionDispatch::Integration::Runner::APP_SESSIONS = T.let(T.unsafe(nil), Hash) + +# An instance of this class represents a set of requests and responses +# performed sequentially by a test process. Because you can instantiate +# multiple sessions and run them side-by-side, you can also mimic (to some +# limited extent) multiple simultaneous users interacting with your system. +# +# Typically, you will instantiate a new session using +# IntegrationTest#open_session, rather than instantiating +# Integration::Session directly. +# +# source://actionpack//lib/action_dispatch/testing/integration.rb#84 +class ActionDispatch::Integration::Session + include ::Minitest::Assertions + include ::ActionDispatch::Assertions::ResponseAssertions + include ::ActionDispatch::Assertions::RoutingAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::ActionDispatch::Assertions + include ::ActionDispatch::Integration::RequestHelpers + include ::ActionDispatch::TestProcess::FixtureFile + include ::ActionDispatch::TestProcess + include ::ActionDispatch::Routing::PolymorphicRoutes + include ::ActionDispatch::Routing::UrlFor + + # Create and initialize a new Session instance. + # + # @return [Session] a new instance of Session + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#126 + def initialize(app); end + + # The Accept header to send. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#103 + def accept; end + + # The Accept header to send. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#103 + def accept=(_arg0); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#90 + def body(*_arg0, **_arg1, &_arg2); end + + # A reference to the controller instance used by the last request. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#112 + def controller; end + + # A map of the cookies returned by the last response, and which will be + # sent with the next request. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#107 + def cookies; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options=(_arg0); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options?; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#90 + def headers(*_arg0, **_arg1, &_arg2); end + + # The hostname used in the last request. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#94 + def host; end + + # Sets the attribute host + # Set the host name to use in the next request. + # + # session.host! "www.example.com" + # + # @param value the value to set the attribute host to. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#97 + def host!(_arg0); end + + # Sets the attribute host + # + # @param value the value to set the attribute host to. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#97 + def host=(_arg0); end + + # Specify whether or not the session should mimic a secure HTTPS request. + # + # session.https! + # session.https!(false) + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#174 + def https!(flag = T.unsafe(nil)); end + + # Returns +true+ if the session is mimicking a secure HTTPS request. + # + # if session.https? + # ... + # end + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#183 + def https?; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#91 + def path(*_arg0, **_arg1, &_arg2); end + + # Performs the actual request. + # + # - +method+: The HTTP method (GET, POST, PATCH, PUT, DELETE, HEAD, OPTIONS) + # as a symbol. + # - +path+: The URI (as a String) on which you want to perform the + # request. + # - +params+: The HTTP parameters that you want to pass. This may + # be +nil+, + # a Hash, or a String that is appropriately encoded + # (application/x-www-form-urlencoded or + # multipart/form-data). + # - +headers+: Additional headers to pass, as a Hash. The headers will be + # merged into the Rack env hash. + # - +env+: Additional env to pass, as a Hash. The headers will be + # merged into the Rack env hash. + # - +xhr+: Set to +true+ if you want to make an Ajax request. + # Adds request headers characteristic of XMLHttpRequest e.g. HTTP_X_REQUESTED_WITH. + # The headers will be merged into the Rack env hash. + # - +as+: Used for encoding the request with different content type. + # Supports +:json+ by default and will set the appropriate request headers. + # The headers will be merged into the Rack env hash. + # + # This method is rarely used directly. Use +#get+, +#post+, or other standard + # HTTP methods in integration tests. +#process+ is only required when using a + # request method that doesn't have a method defined in the integration tests. + # + # This method returns the response status, after performing the request. + # Furthermore, if this method was called from an ActionDispatch::IntegrationTest object, + # then that object's @response instance variable will point to a Response object + # which one can use to inspect the details of the response. + # + # Example: + # process :get, '/author', params: { since: 201501011400 } + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#220 + def process(method, path, params: T.unsafe(nil), headers: T.unsafe(nil), env: T.unsafe(nil), xhr: T.unsafe(nil), as: T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#90 + def redirect?(*_arg0, **_arg1, &_arg2); end + + # The remote_addr used in the last request. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#100 + def remote_addr; end + + # The remote_addr used in the last request. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#100 + def remote_addr=(_arg0); end + + # A reference to the request instance used by the last request. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#115 + def request; end + + # A running counter of the number of requests processed. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#121 + def request_count; end + + # A running counter of the number of requests processed. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#121 + def request_count=(_arg0); end + + # Resets the instance. This can be used to reset the state information + # in an existing session instance, so it can be used from a clean-slate + # condition. + # + # session.reset! + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#150 + def reset!; end + + # A reference to the response instance used by the last request. + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#118 + def response; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#90 + def status(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#90 + def status_message(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#133 + def url_options; end + + private + + # source://actionpack//lib/action_dispatch/testing/integration.rb#300 + def _mock_session; end + + # @yield [location] + # + # source://actionpack//lib/action_dispatch/testing/integration.rb#308 + def build_expanded_path(path); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#304 + def build_full_uri(path, env); end + + class << self + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options=(value); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options?; end + end +end + +# source://actionpack//lib/action_dispatch/testing/integration.rb#85 +ActionDispatch::Integration::Session::DEFAULT_HOST = T.let(T.unsafe(nil), String) + +# An integration test spans multiple controllers and actions, +# tying them all together to ensure they work together as expected. It tests +# more completely than either unit or functional tests do, exercising the +# entire stack, from the dispatcher to the database. +# +# At its simplest, you simply extend IntegrationTest and write your tests +# using the get/post methods: +# +# require "test_helper" +# +# class ExampleTest < ActionDispatch::IntegrationTest +# fixtures :people +# +# def test_login +# # get the login page +# get "/login" +# assert_equal 200, status +# +# # post the login and follow through to the home page +# post "/login", params: { username: people(:jamis).username, +# password: people(:jamis).password } +# follow_redirect! +# assert_equal 200, status +# assert_equal "/home", path +# end +# end +# +# However, you can also have multiple session instances open per test, and +# even extend those instances with assertions and methods to create a very +# powerful testing DSL that is specific for your application. You can even +# reference any named routes you happen to have defined. +# +# require "test_helper" +# +# class AdvancedTest < ActionDispatch::IntegrationTest +# fixtures :people, :rooms +# +# def test_login_and_speak +# jamis, david = login(:jamis), login(:david) +# room = rooms(:office) +# +# jamis.enter(room) +# jamis.speak(room, "anybody home?") +# +# david.enter(room) +# david.speak(room, "hello!") +# end +# +# private +# +# module CustomAssertions +# def enter(room) +# # reference a named route, for maximum internal consistency! +# get(room_url(id: room.id)) +# assert(...) +# ... +# end +# +# def speak(room, message) +# post "/say/#{room.id}", xhr: true, params: { message: message } +# assert(...) +# ... +# end +# end +# +# def login(who) +# open_session do |sess| +# sess.extend(CustomAssertions) +# who = people(who) +# sess.post "/login", params: { username: who.username, +# password: who.password } +# assert(...) +# end +# end +# end +# +# Another longer example would be: +# +# A simple integration test that exercises multiple controllers: +# +# require "test_helper" +# +# class UserFlowsTest < ActionDispatch::IntegrationTest +# test "login and browse site" do +# # login via https +# https! +# get "/login" +# assert_response :success +# +# post "/login", params: { username: users(:david).username, password: users(:david).password } +# follow_redirect! +# assert_equal '/welcome', path +# assert_equal 'Welcome david!', flash[:notice] +# +# https!(false) +# get "/articles/all" +# assert_response :success +# assert_select 'h1', 'Articles' +# end +# end +# +# As you can see the integration test involves multiple controllers and +# exercises the entire stack from database to dispatcher. In addition you can +# have multiple session instances open simultaneously in a test and extend +# those instances with assertion methods to create a very powerful testing +# DSL (domain-specific language) just for your application. +# +# Here's an example of multiple sessions and custom DSL in an integration test +# +# require "test_helper" +# +# class UserFlowsTest < ActionDispatch::IntegrationTest +# test "login and browse site" do +# # User david logs in +# david = login(:david) +# # User guest logs in +# guest = login(:guest) +# +# # Both are now available in different sessions +# assert_equal 'Welcome david!', david.flash[:notice] +# assert_equal 'Welcome guest!', guest.flash[:notice] +# +# # User david can browse site +# david.browses_site +# # User guest can browse site as well +# guest.browses_site +# +# # Continue with other assertions +# end +# +# private +# +# module CustomDsl +# def browses_site +# get "/products/all" +# assert_response :success +# assert_select 'h1', 'Products' +# end +# end +# +# def login(user) +# open_session do |sess| +# sess.extend(CustomDsl) +# u = users(user) +# sess.https! +# sess.post "/login", params: { username: u.username, password: u.password } +# assert_equal '/welcome', sess.path +# sess.https!(false) +# end +# end +# end +# +# See the {request helpers documentation}[rdoc-ref:ActionDispatch::Integration::RequestHelpers] for help on how to +# use +get+, etc. +# +# === Changing the request encoding +# +# You can also test your JSON API easily by setting what the request should +# be encoded as: +# +# require "test_helper" +# +# class ApiTest < ActionDispatch::IntegrationTest +# test "creates articles" do +# assert_difference -> { Article.count } do +# post articles_path, params: { article: { title: "Ahoy!" } }, as: :json +# end +# +# assert_response :success +# assert_equal({ id: Article.last.id, title: "Ahoy!" }, response.parsed_body) +# end +# end +# +# The +as+ option passes an "application/json" Accept header (thereby setting +# the request format to JSON unless overridden), sets the content type to +# "application/json" and encodes the parameters as JSON. +# +# Calling +parsed_body+ on the response parses the response body based on the +# last response MIME type. +# +# Out of the box, only :json is supported. But for any custom MIME +# types you've registered, you can add your own encoders with: +# +# ActionDispatch::IntegrationTest.register_encoder :wibble, +# param_encoder: -> params { params.to_wibble }, +# response_parser: -> body { body } +# +# Where +param_encoder+ defines how the params should be encoded and +# +response_parser+ defines how the response body should be parsed through +# +parsed_body+. +# +# Consult the Rails Testing Guide for more. +# +# source://actionpack//lib/action_dispatch/testing/integration.rb#631 +class ActionDispatch::IntegrationTest < ::ActiveSupport::TestCase + include ::ActionDispatch::TestProcess::FixtureFile + include ::ActionDispatch::Assertions::ResponseAssertions + include ::ActionDispatch::Assertions::RoutingAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::ActionDispatch::Assertions + include ::ActionDispatch::Integration::Runner + include ::ActionController::TemplateAssertions + include ::ActionDispatch::IntegrationTest::Behavior + include ::ActionDispatch::Routing::PolymorphicRoutes + include ::ActionDispatch::Routing::UrlFor + include ::ActionDispatch::IntegrationTest::UrlOptions + extend ::ActionDispatch::IntegrationTest::Behavior::ClassMethods +end + +# source://actionpack//lib/action_dispatch/testing/integration.rb#641 +module ActionDispatch::IntegrationTest::Behavior + include ::ActionDispatch::Assertions::ResponseAssertions + include ::ActionDispatch::Assertions::RoutingAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::ActionDispatch::Assertions + include ::ActionDispatch::Integration::Runner + include ::ActionController::TemplateAssertions + extend ::ActiveSupport::Concern + include ::ActionDispatch::Routing::UrlFor + include ::ActionDispatch::IntegrationTest::UrlOptions + + mixes_in_class_methods ::ActionDispatch::IntegrationTest::Behavior::ClassMethods + + # source://actionpack//lib/action_dispatch/testing/integration.rb#672 + def app; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#676 + def document_root_element; end +end + +# source://actionpack//lib/action_dispatch/testing/integration.rb#654 +module ActionDispatch::IntegrationTest::Behavior::ClassMethods + # source://actionpack//lib/action_dispatch/testing/integration.rb#655 + def app; end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#663 + def app=(app); end + + # source://actionpack//lib/action_dispatch/testing/integration.rb#667 + def register_encoder(*args, **options); end +end + +# source://actionpack//lib/action_dispatch/testing/integration.rb#634 +module ActionDispatch::IntegrationTest::UrlOptions + extend ::ActiveSupport::Concern + + # source://actionpack//lib/action_dispatch/testing/integration.rb#636 + def url_options; end +end + +# :stopdoc: +# +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#4 +module ActionDispatch::Journey; end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#7 +class ActionDispatch::Journey::Ast + # @return [Ast] a new instance of Ast + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#11 + def initialize(tree, formatted); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#37 + def glob?; end + + # Returns the value of attribute names. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#8 + def names; end + + # Returns the value of attribute path_params. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#8 + def path_params; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#23 + def requirements=(requirements); end + + # Returns the value of attribute tree. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#8 + def root; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#33 + def route=(route); end + + # Returns the value of attribute terminals. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#8 + def terminals; end + + # Returns the value of attribute tree. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#8 + def tree; end + + # Returns the value of attribute wildcard_options. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#8 + def wildcard_options; end + + private + + # Returns the value of attribute stars. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#42 + def stars; end + + # Returns the value of attribute symbols. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#42 + def symbols; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#44 + def visit_tree(formatted); end +end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#6 +class ActionDispatch::Journey::Format + # @return [Format] a new instance of Format + # + # source://actionpack//lib/action_dispatch/journey/visitors.rb#22 + def initialize(parts); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#37 + def evaluate(hash); end + + class << self + # source://actionpack//lib/action_dispatch/journey/visitors.rb#14 + def required_path(symbol); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#18 + def required_segment(symbol); end + end +end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#7 +ActionDispatch::Journey::Format::ESCAPE_PATH = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#8 +ActionDispatch::Journey::Format::ESCAPE_SEGMENT = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#10 +class ActionDispatch::Journey::Format::Parameter < ::Struct + # source://actionpack//lib/action_dispatch/journey/visitors.rb#11 + def escape(value); end + + # Returns the value of attribute escaper + # + # @return [Object] the current value of escaper + def escaper; end + + # Sets the attribute escaper + # + # @param value [Object] the value to set the attribute escaper to. + # @return [Object] the newly set value + def escaper=(_); end + + # Returns the value of attribute name + # + # @return [Object] the current value of name + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + def name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# The Formatter class is used for formatting URLs. For example, parameters +# passed to +url_for+ in Rails will eventually call Formatter#generate. +# +# source://actionpack//lib/action_dispatch/journey/formatter.rb#10 +class ActionDispatch::Journey::Formatter + # @return [Formatter] a new instance of Formatter + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#13 + def initialize(routes); end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#97 + def clear; end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#59 + def generate(name, options, path_parameters); end + + # Returns the value of attribute routes. + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#11 + def routes; end + + private + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#196 + def build_cache; end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#207 + def cache; end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#102 + def extract_parameterized_parts(route, options, recall); end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#129 + def match_route(name, options); end + + # Returns an array populated with missing keys if any are present. + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#168 + def missing_keys(route, parts); end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#125 + def named_routes; end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#151 + def non_recursive(cache, options); end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#188 + def possibles(cache, options, depth = T.unsafe(nil)); end +end + +# source://actionpack//lib/action_dispatch/journey/formatter.rb#32 +class ActionDispatch::Journey::Formatter::MissingRoute + # @return [MissingRoute] a new instance of MissingRoute + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#35 + def initialize(constraints, missing_keys, unmatched_keys, routes, name); end + + # Returns the value of attribute constraints. + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#33 + def constraints; end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#51 + def message; end + + # Returns the value of attribute missing_keys. + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#33 + def missing_keys; end + + # Returns the value of attribute name. + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#33 + def name; end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#47 + def params; end + + # @raise [ActionController::UrlGenerationError] + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#43 + def path(method_name); end + + # Returns the value of attribute routes. + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#33 + def routes; end + + # Returns the value of attribute unmatched_keys. + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#33 + def unmatched_keys; end +end + +# source://actionpack//lib/action_dispatch/journey/formatter.rb#18 +class ActionDispatch::Journey::Formatter::RouteWithParams + # @return [RouteWithParams] a new instance of RouteWithParams + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#21 + def initialize(route, parameterized_parts, params); end + + # Returns the value of attribute params. + # + # source://actionpack//lib/action_dispatch/journey/formatter.rb#19 + def params; end + + # source://actionpack//lib/action_dispatch/journey/formatter.rb#27 + def path(_); end +end + +# source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#7 +module ActionDispatch::Journey::GTG; end + +# source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#8 +class ActionDispatch::Journey::GTG::Builder + # @return [Builder] a new instance of Builder + # + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#13 + def initialize(root); end + + # Returns the value of attribute ast. + # + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#11 + def ast; end + + # Returns the value of attribute endpoints. + # + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#11 + def endpoints; end + + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#86 + def firstpos(node); end + + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#107 + def lastpos(node); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#64 + def nullable?(node); end + + # Returns the value of attribute root. + # + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#11 + def root; end + + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#19 + def transition_table; end + + private + + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#129 + def build_followpos; end + + # source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#142 + def symbol(edge); end +end + +# source://actionpack//lib/action_dispatch/journey/gtg/builder.rb#9 +ActionDispatch::Journey::GTG::Builder::DUMMY_END_NODE = T.let(T.unsafe(nil), ActionDispatch::Journey::Nodes::Dummy) + +# source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#8 +class ActionDispatch::Journey::GTG::MatchData + # @return [MatchData] a new instance of MatchData + # + # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#11 + def initialize(memos); end + + # Returns the value of attribute memos. + # + # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#9 + def memos; end +end + +# source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#16 +class ActionDispatch::Journey::GTG::Simulator + # @return [Simulator] a new instance of Simulator + # + # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#21 + def initialize(transition_table); end + + # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#25 + def memos(string); end + + # Returns the value of attribute tt. + # + # source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#19 + def tt; end +end + +# source://actionpack//lib/action_dispatch/journey/gtg/simulator.rb#17 +ActionDispatch::Journey::GTG::Simulator::INITIAL_STATE = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#8 +class ActionDispatch::Journey::GTG::TransitionTable + include ::ActionDispatch::Journey::NFA::Dot + + # @return [TransitionTable] a new instance of TransitionTable + # + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#16 + def initialize; end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#163 + def []=(from, to, sym); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#32 + def accepting?(state); end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#28 + def accepting_states; end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#24 + def add_accepting(state); end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#36 + def add_memo(idx, memo); end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#98 + def as_json(options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#44 + def eclosure(t); end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#40 + def memo(idx); end + + # Returns the value of attribute memos. + # + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#11 + def memos; end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#48 + def move(t, full_string, start_index, end_index); end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#180 + def states; end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#115 + def to_svg; end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#187 + def transitions; end + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#125 + def visualizer(paths, title = T.unsafe(nil)); end + + private + + # source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#198 + def states_hash_for(sym); end +end + +# source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#13 +ActionDispatch::Journey::GTG::TransitionTable::DEFAULT_EXP = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/journey/gtg/transition_table.rb#14 +ActionDispatch::Journey::GTG::TransitionTable::DEFAULT_EXP_ANCHORED = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/journey/nfa/dot.rb#5 +module ActionDispatch::Journey::NFA; end + +# source://actionpack//lib/action_dispatch/journey/nfa/dot.rb#6 +module ActionDispatch::Journey::NFA::Dot + # source://actionpack//lib/action_dispatch/journey/nfa/dot.rb#7 + def to_dot; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#67 +module ActionDispatch::Journey::Nodes; end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#180 +class ActionDispatch::Journey::Nodes::Binary < ::ActionDispatch::Journey::Nodes::Node + # @return [Binary] a new instance of Binary + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#183 + def initialize(left, right); end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#188 + def children; end + + # Returns the value of attribute right. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#181 + def right; end + + # Sets the attribute right + # + # @param value the value to set the attribute right to. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#181 + def right=(_arg0); end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#191 +class ActionDispatch::Journey::Nodes::Cat < ::ActionDispatch::Journey::Nodes::Binary + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#192 + def cat?; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#193 + def type; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#132 +class ActionDispatch::Journey::Nodes::Dot < ::ActionDispatch::Journey::Nodes::Terminal + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#133 + def type; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#120 +class ActionDispatch::Journey::Nodes::Dummy < ::ActionDispatch::Journey::Nodes::Literal + # @return [Dummy] a new instance of Dummy + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#121 + def initialize(x = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#125 + def literal?; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#157 +class ActionDispatch::Journey::Nodes::Group < ::ActionDispatch::Journey::Nodes::Unary + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#159 + def group?; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#158 + def type; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#115 +class ActionDispatch::Journey::Nodes::Literal < ::ActionDispatch::Journey::Nodes::Terminal + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#116 + def literal?; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#117 + def type; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#68 +class ActionDispatch::Journey::Nodes::Node + include ::Enumerable + + # @return [Node] a new instance of Node + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#73 + def initialize(left); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#106 + def cat?; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#78 + def each(&block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#107 + def group?; end + + # Returns the value of attribute left. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#71 + def left; end + + # Sets the attribute left + # + # @param value the value to set the attribute left to. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#71 + def left=(_arg0); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#103 + def literal?; end + + # Returns the value of attribute memo. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#71 + def memo; end + + # Sets the attribute memo + # + # @param value the value to set the attribute memo to. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#71 + def memo=(_arg0); end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#94 + def name; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#105 + def star?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#102 + def symbol?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#104 + def terminal?; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#86 + def to_dot; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#82 + def to_s; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#90 + def to_sym; end + + # @raise [NotImplementedError] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#98 + def type; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#196 +class ActionDispatch::Journey::Nodes::Or < ::ActionDispatch::Journey::Nodes::Node + # @return [Or] a new instance of Or + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#199 + def initialize(children); end + + # Returns the value of attribute children. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#197 + def children; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#203 + def type; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#128 +class ActionDispatch::Journey::Nodes::Slash < ::ActionDispatch::Journey::Nodes::Terminal + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#129 + def type; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#162 +class ActionDispatch::Journey::Nodes::Star < ::ActionDispatch::Journey::Nodes::Unary + # @return [Star] a new instance of Star + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#165 + def initialize(left); end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#175 + def name; end + + # Returns the value of attribute regexp. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#163 + def regexp; end + + # Sets the attribute regexp + # + # @param value the value to set the attribute regexp to. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#163 + def regexp=(_arg0); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#172 + def star?; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#173 + def type; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#136 +class ActionDispatch::Journey::Nodes::Symbol < ::ActionDispatch::Journey::Nodes::Terminal + # @return [Symbol] a new instance of Symbol + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#143 + def initialize(left, regexp = T.unsafe(nil)); end + + # Returns the value of attribute name. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#139 + def name; end + + # Returns the value of attribute regexp. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#137 + def regexp; end + + # Sets the attribute regexp + # + # @param value the value to set the attribute regexp to. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#137 + def regexp=(_arg0); end + + # Returns the value of attribute regexp. + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#137 + def symbol; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#150 + def symbol?; end + + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#149 + def type; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#141 +ActionDispatch::Journey::Nodes::Symbol::DEFAULT_EXP = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#142 +ActionDispatch::Journey::Nodes::Symbol::GREEDY_EXP = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#110 +class ActionDispatch::Journey::Nodes::Terminal < ::ActionDispatch::Journey::Nodes::Node + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#71 + def symbol; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#112 + def terminal?; end +end + +# source://actionpack//lib/action_dispatch/journey/nodes/node.rb#153 +class ActionDispatch::Journey::Nodes::Unary < ::ActionDispatch::Journey::Nodes::Node + # source://actionpack//lib/action_dispatch/journey/nodes/node.rb#154 + def children; end +end + +# source://actionpack//lib/action_dispatch/journey/parser_extras.rb#9 +class ActionDispatch::Journey::Parser < ::Racc::Parser + include ::ActionDispatch::Journey::Nodes + + # @return [Parser] a new instance of Parser + # + # source://actionpack//lib/action_dispatch/journey/parser_extras.rb#16 + def initialize; end + + # reduce 0 omitted + # + # source://actionpack//lib/action_dispatch/journey/parser.rb#137 + def _reduce_1(val, _values); end + + # source://actionpack//lib/action_dispatch/journey/parser.rb#165 + def _reduce_10(val, _values); end + + # reduce 14 omitted + # + # source://actionpack//lib/action_dispatch/journey/parser.rb#177 + def _reduce_15(val, _values); end + + # source://actionpack//lib/action_dispatch/journey/parser.rb#181 + def _reduce_16(val, _values); end + + # source://actionpack//lib/action_dispatch/journey/parser.rb#185 + def _reduce_17(val, _values); end + + # source://actionpack//lib/action_dispatch/journey/parser.rb#189 + def _reduce_18(val, _values); end + + # source://actionpack//lib/action_dispatch/journey/parser.rb#141 + def _reduce_2(val, _values); end + + # reduce 6 omitted + # + # source://actionpack//lib/action_dispatch/journey/parser.rb#153 + def _reduce_7(val, _values); end + + # source://actionpack//lib/action_dispatch/journey/parser.rb#157 + def _reduce_8(val, _values); end + + # source://actionpack//lib/action_dispatch/journey/parser.rb#161 + def _reduce_9(val, _values); end + + # source://actionpack//lib/action_dispatch/journey/parser.rb#193 + def _reduce_none(val, _values); end + + # source://actionpack//lib/action_dispatch/journey/parser_extras.rb#25 + def next_token; end + + # source://actionpack//lib/action_dispatch/journey/parser_extras.rb#20 + def parse(string); end + + class << self + # source://actionpack//lib/action_dispatch/journey/parser_extras.rb#12 + def parse(string); end + end +end + +# source://actionpack//lib/action_dispatch/journey/parser.rb#92 +ActionDispatch::Journey::Parser::Racc_arg = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/journey/parser.rb#131 +ActionDispatch::Journey::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# source://actionpack//lib/action_dispatch/journey/parser.rb#108 +ActionDispatch::Journey::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#5 +module ActionDispatch::Journey::Path; end + +# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#6 +class ActionDispatch::Journey::Path::Pattern + # @return [Pattern] a new instance of Pattern + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#9 + def initialize(ast, requirements, separators, anchored); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#156 + def =~(other); end + + # Returns the value of attribute anchored. + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#7 + def anchored; end + + # Returns the value of attribute ast. + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#7 + def ast; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#23 + def build_formatter; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#27 + def eager_load!; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#156 + def match(other); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#162 + def match?(other); end + + # Returns the value of attribute names. + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#7 + def names; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#59 + def optional_names; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#55 + def required_names; end + + # Returns the value of attribute requirements. + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#7 + def requirements; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#34 + def requirements_anchored?; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#174 + def requirements_for_missing_keys_check; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#166 + def source; end + + # Returns the value of attribute spec. + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#7 + def spec; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#170 + def to_regexp; end + + private + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#185 + def offsets; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#181 + def regexp_visitor; end +end + +# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#65 +class ActionDispatch::Journey::Path::Pattern::AnchoredRegexp < ::ActionDispatch::Journey::Visitors::Visitor + # @return [AnchoredRegexp] a new instance of AnchoredRegexp + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#66 + def initialize(separator, matchers); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#73 + def accept(node); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#77 + def visit_CAT(node); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#94 + def visit_DOT(node); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#90 + def visit_GROUP(node); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#94 + def visit_LITERAL(node); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#108 + def visit_OR(node); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#99 + def visit_SLASH(node); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#103 + def visit_STAR(node); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#81 + def visit_SYMBOL(node); end +end + +# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#121 +class ActionDispatch::Journey::Path::Pattern::MatchData + # @return [MatchData] a new instance of MatchData + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#124 + def initialize(names, offsets, match); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#138 + def [](x); end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#130 + def captures; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#143 + def length; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#134 + def named_captures; end + + # Returns the value of attribute names. + # + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#122 + def names; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#147 + def post_match; end + + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#151 + def to_s; end +end + +# source://actionpack//lib/action_dispatch/journey/path/pattern.rb#114 +class ActionDispatch::Journey::Path::Pattern::UnanchoredRegexp < ::ActionDispatch::Journey::Path::Pattern::AnchoredRegexp + # source://actionpack//lib/action_dispatch/journey/path/pattern.rb#115 + def accept(node); end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#6 +class ActionDispatch::Journey::Route + # +path+ is a path constraint. + # +constraints+ is a hash of constraints to be applied to this route. + # + # @return [Route] a new instance of Route + # + # source://actionpack//lib/action_dispatch/journey/route.rb#56 + def initialize(name:, path:, app: T.unsafe(nil), constraints: T.unsafe(nil), required_defaults: T.unsafe(nil), defaults: T.unsafe(nil), request_method_match: T.unsafe(nil), precedence: T.unsafe(nil), scope_options: T.unsafe(nil), internal: T.unsafe(nil)); end + + # Returns the value of attribute app. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#7 + def app; end + + # Returns the value of attribute ast. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#7 + def ast; end + + # Returns the value of attribute constraints. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#7 + def conditions; end + + # Returns the value of attribute constraints. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#7 + def constraints; end + + # Returns the value of attribute defaults. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#7 + def defaults; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/route.rb#141 + def dispatcher?; end + + # source://actionpack//lib/action_dispatch/journey/route.rb#77 + def eager_load!; end + + # source://actionpack//lib/action_dispatch/journey/route.rb#119 + def format(path_options); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/route.rb#137 + def glob?; end + + # Returns the value of attribute internal. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#7 + def internal; end + + # source://actionpack//lib/action_dispatch/journey/route.rb#163 + def ip; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/route.rb#145 + def matches?(request); end + + # Returns the value of attribute name. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#7 + def name; end + + # source://actionpack//lib/action_dispatch/journey/route.rb#114 + def parts; end + + # Returns the value of attribute path. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#7 + def path; end + + # Returns the value of attribute precedence. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#7 + def precedence; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/route.rb#127 + def required_default?(key); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#131 + def required_defaults; end + + # source://actionpack//lib/action_dispatch/journey/route.rb#102 + def required_keys; end + + # source://actionpack//lib/action_dispatch/journey/route.rb#123 + def required_parts; end + + # Needed for `bin/rails routes`. Picks up succinctly defined requirements + # for a route, for example route + # + # get 'photo/:id', :controller => 'photos', :action => 'show', + # :id => /[A-Z]\d{5}/ + # + # will have {:controller=>"photos", :action=>"show", :id=>/[A-Z]\d{5}/} + # as requirements. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#92 + def requirements; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/route.rb#167 + def requires_matching_verb?; end + + # Returns the value of attribute scope_options. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#7 + def scope_options; end + + # source://actionpack//lib/action_dispatch/journey/route.rb#106 + def score(supplied_keys); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#114 + def segment_keys; end + + # source://actionpack//lib/action_dispatch/journey/route.rb#98 + def segments; end + + # source://actionpack//lib/action_dispatch/journey/route.rb#171 + def verb; end + + private + + # source://actionpack//lib/action_dispatch/journey/route.rb#180 + def match_verb(request); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#176 + def verbs; end + + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#47 + def verb_matcher(verb); end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#12 +module ActionDispatch::Journey::Route::VerbMatchers; end + +# source://actionpack//lib/action_dispatch/journey/route.rb#34 +class ActionDispatch::Journey::Route::VerbMatchers::All + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#35 + def call(_); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#36 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#17 +class ActionDispatch::Journey::Route::VerbMatchers::DELETE + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#19 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#18 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#17 +class ActionDispatch::Journey::Route::VerbMatchers::GET + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#19 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#18 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#17 +class ActionDispatch::Journey::Route::VerbMatchers::HEAD + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#19 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#18 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#17 +class ActionDispatch::Journey::Route::VerbMatchers::LINK + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#19 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#18 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#17 +class ActionDispatch::Journey::Route::VerbMatchers::OPTIONS + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#19 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#18 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#17 +class ActionDispatch::Journey::Route::VerbMatchers::PATCH + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#19 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#18 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#17 +class ActionDispatch::Journey::Route::VerbMatchers::POST + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#19 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#18 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#17 +class ActionDispatch::Journey::Route::VerbMatchers::PUT + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#19 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#18 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#17 +class ActionDispatch::Journey::Route::VerbMatchers::TRACE + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#19 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#18 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#17 +class ActionDispatch::Journey::Route::VerbMatchers::UNLINK + class << self + # source://actionpack//lib/action_dispatch/journey/route.rb#19 + def call(req); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#18 + def verb; end + end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#24 +class ActionDispatch::Journey::Route::VerbMatchers::Unknown + # @return [Unknown] a new instance of Unknown + # + # source://actionpack//lib/action_dispatch/journey/route.rb#27 + def initialize(verb); end + + # source://actionpack//lib/action_dispatch/journey/route.rb#31 + def call(request); end + + # Returns the value of attribute verb. + # + # source://actionpack//lib/action_dispatch/journey/route.rb#25 + def verb; end +end + +# source://actionpack//lib/action_dispatch/journey/route.rb#13 +ActionDispatch::Journey::Route::VerbMatchers::VERBS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/journey/route.rb#39 +ActionDispatch::Journey::Route::VerbMatchers::VERB_TO_CLASS = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#5 +class ActionDispatch::Journey::Router + # @return [Router] a new instance of Router + # + # source://actionpack//lib/action_dispatch/journey/router.rb#20 + def initialize(routes); end + + # source://actionpack//lib/action_dispatch/journey/router.rb#24 + def eager_load!; end + + # source://actionpack//lib/action_dispatch/journey/router.rb#65 + def recognize(rails_req); end + + # Returns the value of attribute routes. + # + # source://actionpack//lib/action_dispatch/journey/router.rb#18 + def routes; end + + # Sets the attribute routes + # + # @param value the value to set the attribute routes to. + # + # source://actionpack//lib/action_dispatch/journey/router.rb#18 + def routes=(_arg0); end + + # source://actionpack//lib/action_dispatch/journey/router.rb#31 + def serve(req); end + + # source://actionpack//lib/action_dispatch/journey/router.rb#78 + def visualizer; end + + private + + # source://actionpack//lib/action_dispatch/journey/router.rb#92 + def ast; end + + # source://actionpack//lib/action_dispatch/journey/router.rb#100 + def custom_routes; end + + # source://actionpack//lib/action_dispatch/journey/router.rb#104 + def filter_routes(path); end + + # source://actionpack//lib/action_dispatch/journey/router.rb#109 + def find_routes(req); end + + # source://actionpack//lib/action_dispatch/journey/router.rb#134 + def match_head_routes(routes, req); end + + # source://actionpack//lib/action_dispatch/journey/router.rb#86 + def partitioned_routes; end + + # source://actionpack//lib/action_dispatch/journey/router.rb#96 + def simulator; end +end + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#6 +class ActionDispatch::Journey::Router::Utils + class << self + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#90 + def escape_fragment(fragment); end + + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#82 + def escape_path(path); end + + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#86 + def escape_segment(segment); end + + # Normalizes URI path. + # + # Strips off trailing slash and ensures there is a leading slash. + # Also converts downcase URL encoded string to uppercase. + # + # normalize_path("/foo") # => "/foo" + # normalize_path("/foo/") # => "/foo" + # normalize_path("foo") # => "/foo" + # normalize_path("") # => "/" + # normalize_path("/%ab") # => "/%AB" + # + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#17 + def normalize_path(path); end + + # Replaces any escaped sequences with their unescaped representations. + # + # uri = "/topics?title=Ruby%20on%20Rails" + # unescape_uri(uri) #=> "/topics?title=Ruby on Rails" + # + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#98 + def unescape_uri(uri); end + end +end + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#80 +ActionDispatch::Journey::Router::Utils::ENCODER = T.let(T.unsafe(nil), ActionDispatch::Journey::Router::Utils::UriEncoder) + +# URI path and fragment escaping +# https://tools.ietf.org/html/rfc3986 +# +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#33 +class ActionDispatch::Journey::Router::Utils::UriEncoder + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#51 + def escape_fragment(fragment); end + + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#55 + def escape_path(path); end + + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#59 + def escape_segment(segment); end + + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#63 + def unescape_uri(uri); end + + private + + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#69 + def escape(component, pattern); end + + # source://actionpack//lib/action_dispatch/journey/router/utils.rb#73 + def percent_encode(unsafe); end +end + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#40 +ActionDispatch::Journey::Router::Utils::UriEncoder::ALPHA = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#38 +ActionDispatch::Journey::Router::Utils::UriEncoder::DEC2HEX = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#41 +ActionDispatch::Journey::Router::Utils::UriEncoder::DIGIT = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#37 +ActionDispatch::Journey::Router::Utils::UriEncoder::EMPTY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#34 +ActionDispatch::Journey::Router::Utils::UriEncoder::ENCODE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#45 +ActionDispatch::Journey::Router::Utils::UriEncoder::ESCAPED = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#47 +ActionDispatch::Journey::Router::Utils::UriEncoder::FRAGMENT = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#49 +ActionDispatch::Journey::Router::Utils::UriEncoder::PATH = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#48 +ActionDispatch::Journey::Router::Utils::UriEncoder::SEGMENT = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#43 +ActionDispatch::Journey::Router::Utils::UriEncoder::SUB_DELIMS = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#42 +ActionDispatch::Journey::Router::Utils::UriEncoder::UNRESERVED = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#35 +ActionDispatch::Journey::Router::Utils::UriEncoder::US_ASCII = T.let(T.unsafe(nil), Encoding) + +# source://actionpack//lib/action_dispatch/journey/router/utils.rb#36 +ActionDispatch::Journey::Router::Utils::UriEncoder::UTF_8 = T.let(T.unsafe(nil), Encoding) + +# The Routing table. Contains all routes for a system. Routes can be +# added to the table by calling Routes#add_route. +# +# source://actionpack//lib/action_dispatch/journey/routes.rb#7 +class ActionDispatch::Journey::Routes + include ::Enumerable + + # @return [Routes] a new instance of Routes + # + # source://actionpack//lib/action_dispatch/journey/routes.rb#12 + def initialize; end + + # source://actionpack//lib/action_dispatch/journey/routes.rb#65 + def add_route(name, mapping); end + + # Returns the value of attribute anchored_routes. + # + # source://actionpack//lib/action_dispatch/journey/routes.rb#10 + def anchored_routes; end + + # source://actionpack//lib/action_dispatch/journey/routes.rb#51 + def ast; end + + # source://actionpack//lib/action_dispatch/journey/routes.rb#37 + def clear; end + + # Returns the value of attribute custom_routes. + # + # source://actionpack//lib/action_dispatch/journey/routes.rb#10 + def custom_routes; end + + # source://actionpack//lib/action_dispatch/journey/routes.rb#33 + def each(&block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/routes.rb#20 + def empty?; end + + # source://actionpack//lib/action_dispatch/journey/routes.rb#29 + def last; end + + # source://actionpack//lib/action_dispatch/journey/routes.rb#24 + def length; end + + # source://actionpack//lib/action_dispatch/journey/routes.rb#43 + def partition_route(route); end + + # Returns the value of attribute routes. + # + # source://actionpack//lib/action_dispatch/journey/routes.rb#10 + def routes; end + + # source://actionpack//lib/action_dispatch/journey/routes.rb#58 + def simulator; end + + # source://actionpack//lib/action_dispatch/journey/routes.rb#24 + def size; end + + private + + # source://actionpack//lib/action_dispatch/journey/routes.rb#74 + def clear_cache!; end +end + +# source://actionpack//lib/action_dispatch/journey/scanner.rb#7 +class ActionDispatch::Journey::Scanner + # @return [Scanner] a new instance of Scanner + # + # source://actionpack//lib/action_dispatch/journey/scanner.rb#8 + def initialize; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/journey/scanner.rb#16 + def eos?; end + + # source://actionpack//lib/action_dispatch/journey/scanner.rb#28 + def next_token; end + + # source://actionpack//lib/action_dispatch/journey/scanner.rb#20 + def pos; end + + # source://actionpack//lib/action_dispatch/journey/scanner.rb#24 + def pre_match; end + + # source://actionpack//lib/action_dispatch/journey/scanner.rb#12 + def scan_setup(str); end + + private + + # takes advantage of String @- deduping capabilities in Ruby 2.5 upwards + # see: https://bugs.ruby-lang.org/issues/13077 + # + # source://actionpack//lib/action_dispatch/journey/scanner.rb#38 + def dedup_scan(regex); end + + # source://actionpack//lib/action_dispatch/journey/scanner.rb#43 + def scan; end +end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#53 +module ActionDispatch::Journey::Visitors; end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#194 +class ActionDispatch::Journey::Visitors::Dot < ::ActionDispatch::Journey::Visitors::FunctionalVisitor + # @return [Dot] a new instance of Dot + # + # source://actionpack//lib/action_dispatch/journey/visitors.rb#195 + def initialize; end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#200 + def accept(node, seed = T.unsafe(nil)); end + + private + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#215 + def binary(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#222 + def nary(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#254 + def terminal(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#229 + def unary(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#239 + def visit_CAT(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#234 + def visit_GROUP(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#249 + def visit_OR(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#244 + def visit_STAR(node, seed); end +end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#260 +ActionDispatch::Journey::Visitors::Dot::INSTANCE = T.let(T.unsafe(nil), ActionDispatch::Journey::Visitors::Dot) + +# Loop through the requirements AST. +# +# source://actionpack//lib/action_dispatch/journey/visitors.rb#159 +class ActionDispatch::Journey::Visitors::Each < ::ActionDispatch::Journey::Visitors::FunctionalVisitor + # source://actionpack//lib/action_dispatch/journey/visitors.rb#160 + def visit(node, block); end +end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#165 +ActionDispatch::Journey::Visitors::Each::INSTANCE = T.let(T.unsafe(nil), ActionDispatch::Journey::Visitors::Each) + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#134 +class ActionDispatch::Journey::Visitors::FormatBuilder < ::ActionDispatch::Journey::Visitors::Visitor + # source://actionpack//lib/action_dispatch/journey/visitors.rb#135 + def accept(node); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#138 + def binary(node); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#136 + def terminal(node); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#142 + def visit_GROUP(n); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#144 + def visit_STAR(n); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#148 + def visit_SYMBOL(n); end +end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#95 +class ActionDispatch::Journey::Visitors::FunctionalVisitor + # source://actionpack//lib/action_dispatch/journey/visitors.rb#98 + def accept(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#106 + def binary(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#111 + def nary(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#122 + def terminal(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#116 + def unary(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#102 + def visit(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#109 + def visit_CAT(n, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#126 + def visit_DOT(n, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#119 + def visit_GROUP(n, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#123 + def visit_LITERAL(n, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#114 + def visit_OR(n, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#125 + def visit_SLASH(n, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#120 + def visit_STAR(n, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#124 + def visit_SYMBOL(n, seed); end +end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#96 +ActionDispatch::Journey::Visitors::FunctionalVisitor::DISPATCH_CACHE = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#168 +class ActionDispatch::Journey::Visitors::String < ::ActionDispatch::Journey::Visitors::FunctionalVisitor + private + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#170 + def binary(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#174 + def nary(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#183 + def terminal(node, seed); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#187 + def visit_GROUP(node, seed); end +end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#191 +ActionDispatch::Journey::Visitors::String::INSTANCE = T.let(T.unsafe(nil), ActionDispatch::Journey::Visitors::String) + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#54 +class ActionDispatch::Journey::Visitors::Visitor + # source://actionpack//lib/action_dispatch/journey/visitors.rb#57 + def accept(node); end + + private + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#66 + def binary(node); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#72 + def nary(node); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#83 + def terminal(node); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#77 + def unary(node); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#62 + def visit(node); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#70 + def visit_CAT(n); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#87 + def visit_DOT(n); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#80 + def visit_GROUP(n); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#84 + def visit_LITERAL(n); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#75 + def visit_OR(n); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#86 + def visit_SLASH(n); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#81 + def visit_STAR(n); end + + # source://actionpack//lib/action_dispatch/journey/visitors.rb#85 + def visit_SYMBOL(n); end +end + +# source://actionpack//lib/action_dispatch/journey/visitors.rb#55 +ActionDispatch::Journey::Visitors::Visitor::DISPATCH_CACHE = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/middleware/stack.rb#7 +class ActionDispatch::MiddlewareStack + include ::Enumerable + + # @return [MiddlewareStack] a new instance of MiddlewareStack + # @yield [_self] + # @yieldparam _self [ActionDispatch::MiddlewareStack] the object that the method was called on + # + # source://actionpack//lib/action_dispatch/middleware/stack.rb#70 + def initialize(*args); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#87 + def [](i); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#160 + def build(app = T.unsafe(nil), &block); end + + # Deletes a middleware from the middleware stack. + # + # Returns the array of middlewares not including the deleted item, or + # returns nil if the target is not found. + # + # source://actionpack//lib/action_dispatch/middleware/stack.rb#125 + def delete(target); end + + # Deletes a middleware from the middleware stack. + # + # Returns the array of middlewares not including the deleted item, or + # raises +RuntimeError+ if the target is not found. + # + # source://actionpack//lib/action_dispatch/middleware/stack.rb#133 + def delete!(target); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#75 + def each(&block); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#100 + def insert(index, klass, *args, **_arg3, &block); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#108 + def insert_after(index, *args, **_arg2, &block); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#100 + def insert_before(index, klass, *args, **_arg3, &block); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#83 + def last; end + + # Returns the value of attribute middlewares. + # + # source://actionpack//lib/action_dispatch/middleware/stack.rb#68 + def middlewares; end + + # Sets the attribute middlewares + # + # @param value the value to set the attribute middlewares to. + # + # source://actionpack//lib/action_dispatch/middleware/stack.rb#68 + def middlewares=(_arg0); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#137 + def move(target, source); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#147 + def move_after(target, source); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#137 + def move_before(target, source); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#79 + def size; end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#114 + def swap(target, *args, **_arg2, &block); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#91 + def unshift(klass, *args, **_arg2, &block); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#155 + def use(klass, *args, **_arg2, &block); end + + private + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#172 + def assert_index(index, where); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#178 + def build_middleware(klass, args, block); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#182 + def index_of(klass); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#96 + def initialize_copy(other); end +end + +# This class is used to instrument the execution of a single middleware. +# It proxies the +call+ method transparently and instruments the method +# call. +# +# source://actionpack//lib/action_dispatch/middleware/stack.rb#48 +class ActionDispatch::MiddlewareStack::InstrumentationProxy + # @return [InstrumentationProxy] a new instance of InstrumentationProxy + # + # source://actionpack//lib/action_dispatch/middleware/stack.rb#51 + def initialize(middleware, class_name); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#59 + def call(env); end +end + +# source://actionpack//lib/action_dispatch/middleware/stack.rb#49 +ActionDispatch::MiddlewareStack::InstrumentationProxy::EVENT_NAME = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/stack.rb#8 +class ActionDispatch::MiddlewareStack::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://actionpack//lib/action_dispatch/middleware/stack.rb#11 + def initialize(klass, args, block); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#19 + def ==(middleware); end + + # Returns the value of attribute args. + # + # source://actionpack//lib/action_dispatch/middleware/stack.rb#9 + def args; end + + # Returns the value of attribute block. + # + # source://actionpack//lib/action_dispatch/middleware/stack.rb#9 + def block; end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#36 + def build(app); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#40 + def build_instrumented(app); end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#28 + def inspect; end + + # Returns the value of attribute klass. + # + # source://actionpack//lib/action_dispatch/middleware/stack.rb#9 + def klass; end + + # source://actionpack//lib/action_dispatch/middleware/stack.rb#17 + def name; end +end + +# source://actionpack//lib/action_dispatch.rb#43 +class ActionDispatch::MissingController < ::NameError; end + +# Configures the HTTP +# {Feature-Policy}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy] +# response header to specify which browser features the current document and +# its iframes can use. +# +# Example global policy: +# +# Rails.application.config.permissions_policy do |policy| +# policy.camera :none +# policy.gyroscope :none +# policy.microphone :none +# policy.usb :none +# policy.fullscreen :self +# policy.payment :self, "https://secure.example.com" +# end +# +# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#22 +class ActionDispatch::PermissionsPolicy + # @return [PermissionsPolicy] a new instance of PermissionsPolicy + # @yield [_self] + # @yieldparam _self [ActionDispatch::PermissionsPolicy] the object that the method was called on + # + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#113 + def initialize; end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def accelerometer(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def ambient_light_sensor(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def autoplay(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#132 + def build(context = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def camera(*sources); end + + # Returns the value of attribute directives. + # + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#111 + def directives; end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def encrypted_media(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def fullscreen(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def geolocation(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def gyroscope(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def magnetometer(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def microphone(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def midi(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def payment(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def picture_in_picture(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def speaker(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def usb(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def vibrate(*sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#123 + def vr(*sources); end + + private + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#150 + def apply_mapping(source); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#137 + def apply_mappings(sources); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#168 + def build_directive(sources, context); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#156 + def build_directives(context); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#118 + def initialize_copy(other); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#172 + def resolve_source(source, context); end +end + +# List of available permissions can be found at +# https://github.com/w3c/webappsec-permissions-policy/blob/master/features.md#policy-controlled-features +# +# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#89 +ActionDispatch::PermissionsPolicy::DIRECTIVES = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#82 +ActionDispatch::PermissionsPolicy::MAPPINGS = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#23 +class ActionDispatch::PermissionsPolicy::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#32 + def initialize(app); end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#36 + def call(env); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#55 + def html_response?(headers); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#65 + def policy_empty?(policy); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#61 + def policy_present?(headers); end +end + +# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#24 +ActionDispatch::PermissionsPolicy::Middleware::CONTENT_TYPE = T.let(T.unsafe(nil), String) + +# The Feature-Policy header has been renamed to Permissions-Policy. +# The Permissions-Policy requires a different implementation and isn't +# yet supported by all browsers. To avoid having to rename this +# middleware in the future we use the new name for the middleware but +# keep the old header name and implementation for now. +# +# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#30 +ActionDispatch::PermissionsPolicy::Middleware::POLICY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#70 +module ActionDispatch::PermissionsPolicy::Request + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#73 + def permissions_policy; end + + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#77 + def permissions_policy=(policy); end +end + +# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#71 +ActionDispatch::PermissionsPolicy::Request::POLICY = T.let(T.unsafe(nil), String) + +# When called, this middleware renders an error page. By default if an HTML +# response is expected it will render static error pages from the /public +# directory. For example when this middleware receives a 500 response it will +# render the template found in /public/500.html. +# If an internationalized locale is set, this middleware will attempt to render +# the template in /public/500..html. If an internationalized template +# is not found it will fall back on /public/500.html. +# +# When a request with a content type other than HTML is made, this middleware +# will attempt to convert error information into the appropriate response type. +# +# source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#14 +class ActionDispatch::PublicExceptions + # @return [PublicExceptions] a new instance of PublicExceptions + # + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#17 + def initialize(public_path); end + + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#21 + def call(env); end + + # Returns the value of attribute public_path. + # + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#15 + def public_path; end + + # Sets the attribute public_path + # + # @param value the value to set the attribute public_path to. + # + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#15 + def public_path=(_arg0); end + + private + + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#35 + def render(status, content_type, body); end + + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#44 + def render_format(status, content_type, body); end + + # source://actionpack//lib/action_dispatch/middleware/public_exceptions.rb#49 + def render_html(status); end +end + +# source://actionpack//lib/action_dispatch/railtie.rb#7 +class ActionDispatch::Railtie < ::Rails::Railtie; end + +# ActionDispatch::Reloader wraps the request with callbacks provided by ActiveSupport::Reloader +# callbacks, intended to assist with code reloading during development. +# +# By default, ActionDispatch::Reloader is included in the middleware stack +# only in the development environment; specifically, when +config.cache_classes+ +# is false. +# +# source://actionpack//lib/action_dispatch/middleware/reloader.rb#10 +class ActionDispatch::Reloader < ::ActionDispatch::Executor; end + +# This middleware calculates the IP address of the remote client that is +# making the request. It does this by checking various headers that could +# contain the address, and then picking the last-set address that is not +# on the list of trusted IPs. This follows the precedent set by e.g. +# {the Tomcat server}[https://issues.apache.org/bugzilla/show_bug.cgi?id=50453], +# with {reasoning explained at length}[https://blog.gingerlime.com/2012/rails-ip-spoofing-vulnerabilities-and-protection] +# by @gingerlime. A more detailed explanation of the algorithm is given +# at GetIp#calculate_ip. +# +# Some Rack servers concatenate repeated headers, like {HTTP RFC 2616}[https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2] +# requires. Some Rack servers simply drop preceding headers, and only report +# the value that was {given in the last header}[https://andre.arko.net/2011/12/26/repeated-headers-and-ruby-web-servers]. +# If you are behind multiple proxy servers (like NGINX to HAProxy to Unicorn) +# then you should test your Rack server to make sure your data is good. +# +# IF YOU DON'T USE A PROXY, THIS MAKES YOU VULNERABLE TO IP SPOOFING. +# This middleware assumes that there is at least one proxy sitting around +# and setting headers with the client's remote IP address. If you don't use +# a proxy, because you are hosted on e.g. Heroku without SSL, any client can +# claim to have any IP address by setting the X-Forwarded-For header. If you +# care about that, then you need to explicitly drop or ignore those headers +# sometime before this middleware runs. +# +# source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#28 +class ActionDispatch::RemoteIp + # Create a new +RemoteIp+ middleware instance. + # + # The +ip_spoofing_check+ option is on by default. When on, an exception + # is raised if it looks like the client is trying to lie about its own IP + # address. It makes sense to turn off this check on sites aimed at non-IP + # clients (like WAP devices), or behind proxies that set headers in an + # incorrect or confusing way (like AWS ELB). + # + # The +custom_proxies+ argument can take an enumerable which will be used + # instead of +TRUSTED_PROXIES+. Any proxy setup will put the value you + # want in the middle (or at the beginning) of the X-Forwarded-For list, + # with your proxy servers after it. If your proxies aren't removed, pass + # them in via the +custom_proxies+ parameter. That way, the middleware will + # ignore those IP addresses, and return the one that you want. + # + # @return [RemoteIp] a new instance of RemoteIp + # + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#60 + def initialize(app, ip_spoofing_check = T.unsafe(nil), custom_proxies = T.unsafe(nil)); end + + # Since the IP address may not be needed, we store the object here + # without calculating the IP to keep from slowing down the majority of + # requests. For those requests that do need to know the IP, the + # GetIp#calculate_ip method will calculate the memoized client IP address. + # + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#90 + def call(env); end + + # Returns the value of attribute check_ip. + # + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#44 + def check_ip; end + + # Returns the value of attribute proxies. + # + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#44 + def proxies; end +end + +# The GetIp class exists as a way to defer processing of the request data +# into an actual IP address. If the ActionDispatch::Request#remote_ip method +# is called, this class will calculate the value and then memoize it. +# +# source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#99 +class ActionDispatch::RemoteIp::GetIp + # @return [GetIp] a new instance of GetIp + # + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#100 + def initialize(req, check_ip, proxies); end + + # Sort through the various IP address headers, looking for the IP most + # likely to be the address of the actual remote client making this + # request. + # + # REMOTE_ADDR will be correct if the request is made directly against the + # Ruby process, on e.g. Heroku. When the request is proxied by another + # server like HAProxy or NGINX, the IP address that made the original + # request will be put in an X-Forwarded-For header. If there are multiple + # proxies, that header may contain a list of IPs. Other proxy services + # set the Client-Ip header instead, so we check that too. + # + # As discussed in {this post about Rails IP Spoofing}[https://blog.gingerlime.com/2012/rails-ip-spoofing-vulnerabilities-and-protection/], + # while the first IP in the list is likely to be the "originating" IP, + # it could also have been set by the client maliciously. + # + # In order to find the first address that is (probably) accurate, we + # take the list of IPs, remove known and trusted proxies, and then take + # the last address left, which was presumably set by one of those proxies. + # + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#124 + def calculate_ip; end + + # Memoizes the value returned by #calculate_ip and returns it for + # ActionDispatch::Request to use. + # + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#167 + def to_s; end + + private + + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#186 + def filter_proxies(ips); end + + # source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#172 + def ips_from(header); end +end + +# source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#29 +class ActionDispatch::RemoteIp::IpSpoofAttackError < ::StandardError; end + +# The default trusted IPs list simply includes IP addresses that are +# guaranteed by the IP specification to be private addresses. Those will +# not be the ultimate client IP in production, and so are discarded. See +# https://en.wikipedia.org/wiki/Private_network for details. +# +# source://actionpack//lib/action_dispatch/middleware/remote_ip.rb#35 +ActionDispatch::RemoteIp::TRUSTED_PROXIES = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/request.rb#18 +class ActionDispatch::Request + include ::ActionDispatch::Flash::RequestMethods + include ::Rack::Request::Helpers + include ::ActionDispatch::Http::Cache::Request + include ::ActionDispatch::Http::MimeNegotiation + include ::ActionDispatch::Http::Parameters + include ::ActionDispatch::Http::FilterParameters + include ::ActionDispatch::Http::URL + include ::ActionDispatch::ContentSecurityPolicy::Request + include ::ActionDispatch::PermissionsPolicy::Request + include ::Rack::Request::Env + include ::ActionDispatch::RequestCookieMethods + extend ::ActionDispatch::Http::Parameters::ClassMethods + + # @return [Request] a new instance of Request + # + # source://actionpack//lib/action_dispatch/http/request.rb#60 + def initialize(env); end + + # Override Rack's GET method to support indifferent access. + # + # source://actionpack//lib/action_dispatch/http/request.rb#372 + def GET; end + + # Override Rack's POST method to support indifferent access. + # + # source://actionpack//lib/action_dispatch/http/request.rb#388 + def POST; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def accept; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def accept_charset; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def accept_encoding; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def accept_language; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def auth_type; end + + # Returns the authorization header regardless of whether it was specified directly or through one of the + # proxy alternatives. + # + # source://actionpack//lib/action_dispatch/http/request.rb#404 + def authorization; end + + # The request body is an IO input stream. If the RAW_POST_DATA environment + # variable is already set, wrap it in a StringIO. + # + # source://actionpack//lib/action_dispatch/http/request.rb#334 + def body; end + + # source://actionpack//lib/action_dispatch/http/request.rb#355 + def body_stream; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def cache_control; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def client_ip; end + + # source://actionpack//lib/action_dispatch/http/request.rb#70 + def commit_cookie_jar!; end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#62 + def commit_flash; end + + # Returns the content length of the request as an integer. + # + # source://actionpack//lib/action_dispatch/http/request.rb#270 + def content_length; end + + # source://actionpack//lib/action_dispatch/http/request.rb#79 + def controller_class; end + + # source://actionpack//lib/action_dispatch/http/request.rb#85 + def controller_class_for(name); end + + # source://actionpack//lib/action_dispatch/http/request.rb#171 + def controller_instance; end + + # source://actionpack//lib/action_dispatch/http/request.rb#175 + def controller_instance=(controller); end + + # source://actionpack//lib/action_dispatch/http/request.rb#157 + def engine_script_name(_routes); end + + # source://actionpack//lib/action_dispatch/http/request.rb#161 + def engine_script_name=(name); end + + # Determine whether the request body contains form-data by checking + # the request Content-Type for one of the media-types: + # "application/x-www-form-urlencoded" or "multipart/form-data". The + # list of form-data media types can be modified through the + # +FORM_DATA_MEDIA_TYPES+ array. + # + # A request body is not assumed to contain form-data when no + # Content-Type header is provided and the request_method is POST. + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/request.rb#351 + def form_data?; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def from; end + + # Returns the +String+ full path including params of the last URL requested. + # + # # get "/articles" + # request.fullpath # => "/articles" + # + # # get "/articles?page=2" + # request.fullpath # => "/articles?page=2" + # + # source://actionpack//lib/action_dispatch/http/request.rb#249 + def fullpath; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def gateway_interface; end + + # Provides access to the request's HTTP headers, for example: + # + # request.headers["Content-Type"] # => "text/plain" + # + # source://actionpack//lib/action_dispatch/http/request.rb#210 + def headers; end + + # source://actionpack//lib/action_dispatch/http/request.rb#179 + def http_auth_salt; end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#18 + def ignore_accept_header; end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#18 + def ignore_accept_header=(val); end + + # source://actionpack//lib/action_dispatch/http/request.rb#428 + def inspect; end + + # Returns the IP address of client as a +String+. + # + # source://actionpack//lib/action_dispatch/http/request.rb#283 + def ip; end + + # Returns true if the request has a header matching the given key parameter. + # + # request.key? :ip_spoofing_check # => true + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/request.rb#106 + def key?(key); end + + # True if the request came from localhost, 127.0.0.1, or ::1. + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/request.rb#412 + def local?; end + + # source://actionpack//lib/action_dispatch/http/request.rb#421 + def logger; end + + # The +String+ MIME type of the request. + # + # # get "/articles" + # request.media_type # => "application/x-www-form-urlencoded" + # + # source://actionpack//lib/action_dispatch/http/request.rb#265 + def media_type; end + + # Returns the original value of the environment's REQUEST_METHOD, + # even if it was overridden by middleware. See #request_method for + # more information. + # + # source://actionpack//lib/action_dispatch/http/request.rb#198 + def method; end + + # Returns a symbol form of the #method. + # + # source://actionpack//lib/action_dispatch/http/request.rb#203 + def method_symbol; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def negotiate; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def origin; end + + # Returns a +String+ with the last requested path including their params. + # + # # get '/foo' + # request.original_fullpath # => '/foo' + # + # # get '/foo?bar' + # request.original_fullpath # => '/foo?bar' + # + # source://actionpack//lib/action_dispatch/http/request.rb#238 + def original_fullpath; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def original_script_name; end + + # Returns the original request URL as a +String+. + # + # # get "/articles?page=2" + # request.original_url # => "http://www.example.com/articles?page=2" + # + # source://actionpack//lib/action_dispatch/http/request.rb#257 + def original_url; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def path_translated; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def pragma; end + + # Override Rack's GET method to support indifferent access. + # + # source://actionpack//lib/action_dispatch/http/request.rb#372 + def query_parameters; end + + # Read the request \body. This is useful for web services that need to + # work with raw requests directly. + # + # source://actionpack//lib/action_dispatch/http/request.rb#323 + def raw_post; end + + # source://rack/2.2.6.4/lib/rack/request.rb#157 + def raw_request_method; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def remote_addr; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def remote_host; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def remote_ident; end + + # Returns the IP address of client as a +String+, + # usually set by the RemoteIp middleware. + # + # source://actionpack//lib/action_dispatch/http/request.rb#289 + def remote_ip; end + + # source://actionpack//lib/action_dispatch/http/request.rb#293 + def remote_ip=(remote_ip); end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def remote_user; end + + # Returns the unique request id, which is based on either the X-Request-Id header that can + # be generated by a firewall, load balancer, or web server, or by the RequestId middleware + # (which sets the +action_dispatch.request_id+ environment variable). + # + # This unique ID is useful for tracing a request from end-to-end as part of logging or debugging. + # This relies on the Rack variable set by the ActionDispatch::RequestId middleware. + # + # source://actionpack//lib/action_dispatch/http/request.rb#306 + def request_id; end + + # source://actionpack//lib/action_dispatch/http/request.rb#310 + def request_id=(id); end + + # Returns the HTTP \method that the application should see. + # In the case where the \method was overridden by a middleware + # (for instance, if a HEAD request was converted to a GET, + # or if a _method parameter was used to determine the \method + # the application should use), this \method returns the overridden + # value, not the original. + # + # source://actionpack//lib/action_dispatch/http/request.rb#145 + def request_method; end + + # source://actionpack//lib/action_dispatch/http/request.rb#165 + def request_method=(request_method); end + + # Returns a symbol form of the #request_method. + # + # source://actionpack//lib/action_dispatch/http/request.rb#191 + def request_method_symbol; end + + # Override Rack's POST method to support indifferent access. + # + # source://actionpack//lib/action_dispatch/http/request.rb#388 + def request_parameters; end + + # source://actionpack//lib/action_dispatch/http/request.rb#416 + def request_parameters=(params); end + + # source://actionpack//lib/action_dispatch/middleware/flash.rb#75 + def reset_session; end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#19 + def return_only_media_type_on_content_type; end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#19 + def return_only_media_type_on_content_type=(val); end + + # source://actionpack//lib/action_dispatch/http/request.rb#149 + def routes; end + + # source://actionpack//lib/action_dispatch/http/request.rb#153 + def routes=(routes); end + + # Early Hints is an HTTP/2 status code that indicates hints to help a client start + # making preparations for processing the final response. + # + # If the env contains +rack.early_hints+ then the server accepts HTTP2 push for Link headers. + # + # The +send_early_hints+ method accepts a hash of links as follows: + # + # send_early_hints("Link" => "; rel=preload; as=style\n; rel=preload") + # + # If you are using +javascript_include_tag+ or +stylesheet_link_tag+ the + # Early Hints headers are included by default if supported. + # + # source://actionpack//lib/action_dispatch/http/request.rb#225 + def send_early_hints(links); end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def server_name; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def server_protocol; end + + # Returns the lowercase name of the HTTP server software. + # + # source://actionpack//lib/action_dispatch/http/request.rb#317 + def server_software; end + + # source://actionpack//lib/action_dispatch/http/request.rb#363 + def session=(session); end + + # source://actionpack//lib/action_dispatch/http/request.rb#367 + def session_options=(options); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/request.rb#183 + def show_exceptions?; end + + # Returns the unique request id, which is based on either the X-Request-Id header that can + # be generated by a firewall, load balancer, or web server, or by the RequestId middleware + # (which sets the +action_dispatch.request_id+ environment variable). + # + # This unique ID is useful for tracing a request from end-to-end as part of logging or debugging. + # This relies on the Rack variable set by the ActionDispatch::RequestId middleware. + # + # source://actionpack//lib/action_dispatch/http/request.rb#306 + def uuid; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def version; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def x_csrf_token; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def x_forwarded_for; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def x_forwarded_host; end + + # source://actionpack//lib/action_dispatch/http/request.rb#50 + def x_request_id; end + + # Returns true if the "X-Requested-With" header contains "XMLHttpRequest" + # (case-insensitive), which may need to be manually added depending on the + # choice of JavaScript libraries and frameworks. + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/request.rb#277 + def xhr?; end + + # Returns true if the "X-Requested-With" header contains "XMLHttpRequest" + # (case-insensitive), which may need to be manually added depending on the + # choice of JavaScript libraries and frameworks. + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/request.rb#277 + def xml_http_request?; end + + private + + # source://actionpack//lib/action_dispatch/http/request.rb#433 + def check_method(name); end + + # source://actionpack//lib/action_dispatch/http/request.rb#438 + def default_session; end + + class << self + # source://actionpack//lib/action_dispatch/http/request.rb#56 + def empty; end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#18 + def ignore_accept_header; end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#18 + def ignore_accept_header=(val); end + + # source://actionpack//lib/action_dispatch/http/parameters.rb#28 + def parameter_parsers; end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#19 + def return_only_media_type_on_content_type; end + + # source://actionpack//lib/action_dispatch/http/mime_negotiation.rb#19 + def return_only_media_type_on_content_type=(val); end + end +end + +# source://actionpack//lib/action_dispatch/http/request.rb#298 +ActionDispatch::Request::ACTION_DISPATCH_REQUEST_ID = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/request.rb#34 +ActionDispatch::Request::ENV_METHODS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/request.rb#128 +ActionDispatch::Request::HTTP_METHODS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/request.rb#130 +ActionDispatch::Request::HTTP_METHOD_LOOKUP = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/http/request.rb#32 +ActionDispatch::Request::LOCALHOST = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/http/request.rb#73 +class ActionDispatch::Request::PASS_NOT_FOUND + class << self + # source://actionpack//lib/action_dispatch/http/request.rb#74 + def action(_); end + + # source://actionpack//lib/action_dispatch/http/request.rb#76 + def action_encoding_template(action); end + + # source://actionpack//lib/action_dispatch/http/request.rb#75 + def call(_); end + end +end + +# source://actionpack//lib/action_dispatch/http/request.rb#120 +ActionDispatch::Request::RFC2518 = T.let(T.unsafe(nil), Array) + +# List of HTTP request methods from the following RFCs: +# Hypertext Transfer Protocol -- HTTP/1.1 (https://www.ietf.org/rfc/rfc2616.txt) +# HTTP Extensions for Distributed Authoring -- WEBDAV (https://www.ietf.org/rfc/rfc2518.txt) +# Versioning Extensions to WebDAV (https://www.ietf.org/rfc/rfc3253.txt) +# Ordered Collections Protocol (WebDAV) (https://www.ietf.org/rfc/rfc3648.txt) +# Web Distributed Authoring and Versioning (WebDAV) Access Control Protocol (https://www.ietf.org/rfc/rfc3744.txt) +# Web Distributed Authoring and Versioning (WebDAV) SEARCH (https://www.ietf.org/rfc/rfc5323.txt) +# Calendar Extensions to WebDAV (https://www.ietf.org/rfc/rfc4791.txt) +# PATCH Method for HTTP (https://www.ietf.org/rfc/rfc5789.txt) +# +# source://actionpack//lib/action_dispatch/http/request.rb#119 +ActionDispatch::Request::RFC2616 = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/request.rb#121 +ActionDispatch::Request::RFC3253 = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/request.rb#122 +ActionDispatch::Request::RFC3648 = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/request.rb#123 +ActionDispatch::Request::RFC3744 = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/request.rb#125 +ActionDispatch::Request::RFC4791 = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/request.rb#124 +ActionDispatch::Request::RFC5323 = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/request.rb#126 +ActionDispatch::Request::RFC5789 = T.let(T.unsafe(nil), Array) + +# Session is responsible for lazily loading the session from store. +# +# source://actionpack//lib/action_dispatch/request/session.rb#8 +class ActionDispatch::Request::Session + # @return [Session] a new instance of Session + # + # source://actionpack//lib/action_dispatch/request/session.rb#74 + def initialize(by, req, enabled: T.unsafe(nil)); end + + # Returns value of the key stored in the session or + # +nil+ if the given key is not found in the session. + # + # source://actionpack//lib/action_dispatch/request/session.rb#110 + def [](key); end + + # Writes given value to given key of the session. + # + # source://actionpack//lib/action_dispatch/request/session.rb#150 + def []=(key, value); end + + # Clears the session. + # + # source://actionpack//lib/action_dispatch/request/session.rb#156 + def clear; end + + # Deletes given key from the session. + # + # source://actionpack//lib/action_dispatch/request/session.rb#184 + def delete(key); end + + # source://actionpack//lib/action_dispatch/request/session.rb#95 + def destroy; end + + # Returns the nested value specified by the sequence of keys, returning + # +nil+ if any intermediate step is +nil+. + # + # source://actionpack//lib/action_dispatch/request/session.rb#123 + def dig(*keys); end + + # source://actionpack//lib/action_dispatch/request/session.rb#240 + def each(&block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/request/session.rb#230 + def empty?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/request/session.rb#87 + def enabled?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/request/session.rb#220 + def exists?; end + + # Returns value of the given key from the session, or raises +KeyError+ + # if can't find the given key and no default value is set. + # Returns default value if specified. + # + # session.fetch(:foo) + # # => KeyError: key not found: "foo" + # + # session.fetch(:foo, :bar) + # # => :bar + # + # session.fetch(:foo) do + # :bar + # end + # # => :bar + # + # source://actionpack//lib/action_dispatch/request/session.rb#203 + def fetch(key, default = T.unsafe(nil), &block); end + + # Returns true if the session has the given key or false. + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/request/session.rb#130 + def has_key?(key); end + + # source://actionpack//lib/action_dispatch/request/session.rb#83 + def id; end + + # Returns true if the session has the given key or false. + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/request/session.rb#130 + def include?(key); end + + # source://actionpack//lib/action_dispatch/request/session.rb#212 + def inspect; end + + # Returns true if the session has the given key or false. + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/request/session.rb#130 + def key?(key); end + + # Returns keys of the session as Array. + # + # source://actionpack//lib/action_dispatch/request/session.rb#138 + def keys; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/request/session.rb#226 + def loaded?; end + + # source://actionpack//lib/action_dispatch/request/session.rb#235 + def merge!(other); end + + # source://actionpack//lib/action_dispatch/request/session.rb#91 + def options; end + + # Returns the session as Hash. + # + # source://actionpack//lib/action_dispatch/request/session.rb#162 + def to_h; end + + # Returns the session as Hash. + # + # source://actionpack//lib/action_dispatch/request/session.rb#162 + def to_hash; end + + # Updates the session with given Hash. + # + # session.to_hash + # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2"} + # + # session.update({ "foo" => "bar" }) + # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2", "foo" => "bar"} + # + # session.to_hash + # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2", "foo" => "bar"} + # + # source://actionpack//lib/action_dispatch/request/session.rb#178 + def update(hash); end + + # Returns values of the session as Array. + # + # source://actionpack//lib/action_dispatch/request/session.rb#144 + def values; end + + private + + # source://actionpack//lib/action_dispatch/request/session.rb#261 + def load!; end + + # source://actionpack//lib/action_dispatch/request/session.rb#257 + def load_for_delete!; end + + # source://actionpack//lib/action_dispatch/request/session.rb#245 + def load_for_read!; end + + # source://actionpack//lib/action_dispatch/request/session.rb#249 + def load_for_write!; end + + class << self + # Creates a session hash, merging the properties of the previous session if any. + # + # source://actionpack//lib/action_dispatch/request/session.rb#17 + def create(store, req, default_options); end + + # source://actionpack//lib/action_dispatch/request/session.rb#41 + def delete(req); end + + # source://actionpack//lib/action_dispatch/request/session.rb#27 + def disabled(req); end + + # source://actionpack//lib/action_dispatch/request/session.rb#33 + def find(req); end + + # source://actionpack//lib/action_dispatch/request/session.rb#37 + def set(req, session); end + end +end + +# source://actionpack//lib/action_dispatch/request/session.rb#9 +class ActionDispatch::Request::Session::DisabledSessionError < ::StandardError; end + +# source://actionpack//lib/action_dispatch/request/session.rb#10 +ActionDispatch::Request::Session::ENV_SESSION_KEY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/request/session.rb#11 +ActionDispatch::Request::Session::ENV_SESSION_OPTIONS_KEY = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/request/session.rb#45 +class ActionDispatch::Request::Session::Options + # @return [Options] a new instance of Options + # + # source://actionpack//lib/action_dispatch/request/session.rb#54 + def initialize(by, default_options); end + + # source://actionpack//lib/action_dispatch/request/session.rb#59 + def [](key); end + + # source://actionpack//lib/action_dispatch/request/session.rb#69 + def []=(k, v); end + + # source://actionpack//lib/action_dispatch/request/session.rb#63 + def id(req); end + + # source://actionpack//lib/action_dispatch/request/session.rb#70 + def to_hash; end + + # source://actionpack//lib/action_dispatch/request/session.rb#71 + def values_at(*args); end + + class << self + # source://actionpack//lib/action_dispatch/request/session.rb#50 + def find(req); end + + # source://actionpack//lib/action_dispatch/request/session.rb#46 + def set(req, options); end + end +end + +# Singleton object used to determine if an optional param wasn't specified. +# +# source://actionpack//lib/action_dispatch/request/session.rb#14 +ActionDispatch::Request::Session::Unspecified = T.let(T.unsafe(nil), Object) + +# source://actionpack//lib/action_dispatch/request/utils.rb#7 +class ActionDispatch::Request::Utils + # source://actionpack//lib/action_dispatch/request/utils.rb#8 + def perform_deep_munge; end + + # source://actionpack//lib/action_dispatch/request/utils.rb#8 + def perform_deep_munge=(val); end + + class << self + # source://actionpack//lib/action_dispatch/request/utils.rb#29 + def check_param_encoding(params); end + + # source://actionpack//lib/action_dispatch/request/utils.rb#10 + def each_param_value(params, &block); end + + # source://actionpack//lib/action_dispatch/request/utils.rb#21 + def normalize_encode_params(params); end + + # source://actionpack//lib/action_dispatch/request/utils.rb#8 + def perform_deep_munge; end + + # source://actionpack//lib/action_dispatch/request/utils.rb#8 + def perform_deep_munge=(val); end + + # source://actionpack//lib/action_dispatch/request/utils.rb#44 + def set_binary_encoding(request, params, controller, action); end + end +end + +# source://actionpack//lib/action_dispatch/request/utils.rb#81 +class ActionDispatch::Request::Utils::CustomParamEncoder + class << self + # source://actionpack//lib/action_dispatch/request/utils.rb#94 + def action_encoding_template(request, controller, action); end + + # source://actionpack//lib/action_dispatch/request/utils.rb#82 + def encode(request, params, controller, action); end + end +end + +# Remove nils from the params hash. +# +# source://actionpack//lib/action_dispatch/request/utils.rb#73 +class ActionDispatch::Request::Utils::NoNilParamEncoder < ::ActionDispatch::Request::Utils::ParamEncoder + class << self + # source://actionpack//lib/action_dispatch/request/utils.rb#74 + def handle_array(params); end + end +end + +# source://actionpack//lib/action_dispatch/request/utils.rb#48 +class ActionDispatch::Request::Utils::ParamEncoder + class << self + # source://actionpack//lib/action_dispatch/request/utils.rb#67 + def handle_array(params); end + + # Convert nested Hash to HashWithIndifferentAccess. + # + # source://actionpack//lib/action_dispatch/request/utils.rb#50 + def normalize_encode_params(params); end + end +end + +# source://actionpack//lib/action_dispatch/middleware/cookies.rb#10 +module ActionDispatch::RequestCookieMethods + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#48 + def authenticated_encrypted_cookie_salt; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#11 + def cookie_jar; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#28 + def cookie_jar=(jar); end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#76 + def cookies_digest; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#80 + def cookies_rotations; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#72 + def cookies_same_site_protection; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#68 + def cookies_serializer; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#56 + def encrypted_cookie_cipher; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#40 + def encrypted_cookie_salt; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#44 + def encrypted_signed_cookie_salt; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#24 + def have_cookie_jar?; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#32 + def key_generator; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#64 + def secret_key_base; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#60 + def signed_cookie_digest; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#36 + def signed_cookie_salt; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#52 + def use_authenticated_cookie_encryption; end + + # source://actionpack//lib/action_dispatch/middleware/cookies.rb#84 + def use_cookies_with_metadata; end +end + +# source://actionpack//lib/action_dispatch/testing/request_encoder.rb#4 +class ActionDispatch::RequestEncoder + # @return [RequestEncoder] a new instance of RequestEncoder + # + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#16 + def initialize(mime_name, param_encoder, response_parser); end + + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#32 + def accept_header; end + + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#28 + def content_type; end + + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#36 + def encode_params(params); end + + # Returns the value of attribute response_parser. + # + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#14 + def response_parser; end + + class << self + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#45 + def encoder(name); end + + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#40 + def parser(content_type); end + + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#49 + def register_encoder(mime_name, param_encoder: T.unsafe(nil), response_parser: T.unsafe(nil)); end + end +end + +# source://actionpack//lib/action_dispatch/testing/request_encoder.rb#5 +class ActionDispatch::RequestEncoder::IdentityEncoder + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#7 + def accept_header; end + + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#6 + def content_type; end + + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#8 + def encode_params(params); end + + # source://actionpack//lib/action_dispatch/testing/request_encoder.rb#9 + def response_parser; end +end + +# Makes a unique request id available to the +action_dispatch.request_id+ env variable (which is then accessible +# through ActionDispatch::Request#request_id or the alias ActionDispatch::Request#uuid) and sends +# the same id to the client via the X-Request-Id header. +# +# The unique request id is either based on the X-Request-Id header in the request, which would typically be generated +# by a firewall, load balancer, or the web server, or, if this header is not available, a random uuid. If the +# header is accepted from the outside world, we sanitize it to a max of 255 chars and alphanumeric and dashes only. +# +# The unique request id can be used to trace a request end-to-end and would typically end up being part of log files +# from multiple pieces of the stack. +# +# source://actionpack//lib/action_dispatch/middleware/request_id.rb#17 +class ActionDispatch::RequestId + # @return [RequestId] a new instance of RequestId + # + # source://actionpack//lib/action_dispatch/middleware/request_id.rb#18 + def initialize(app, header:); end + + # source://actionpack//lib/action_dispatch/middleware/request_id.rb#23 + def call(env); end + + private + + # source://actionpack//lib/action_dispatch/middleware/request_id.rb#38 + def internal_request_id; end + + # source://actionpack//lib/action_dispatch/middleware/request_id.rb#30 + def make_request_id(request_id); end +end + +# Represents an HTTP response generated by a controller action. Use it to +# retrieve the current state of the response, or customize the response. It can +# either represent a real HTTP response (i.e. one that is meant to be sent +# back to the web browser) or a TestResponse (i.e. one that is generated +# from integration tests). +# +# \Response is mostly a Ruby on \Rails framework implementation detail, and +# should never be used directly in controllers. Controllers should use the +# methods defined in ActionController::Base instead. For example, if you want +# to set the HTTP response's content MIME type, then use +# ActionControllerBase#headers instead of Response#headers. +# +# Nevertheless, integration tests may want to inspect controller responses in +# more detail, and that's when \Response can be useful for application +# developers. Integration test methods such as +# Integration::RequestHelpers#get and Integration::RequestHelpers#post return +# objects of type TestResponse (which are of course also of type \Response). +# +# For example, the following demo integration test prints the body of the +# controller response to the console: +# +# class DemoControllerTest < ActionDispatch::IntegrationTest +# def test_print_root_path_to_console +# get('/') +# puts response.body +# end +# end +# +# source://actionpack//lib/action_dispatch/http/response.rb#36 +class ActionDispatch::Response + include ::Rack::Response::Helpers + include ::ActionDispatch::Http::FilterRedirect + include ::ActionDispatch::Http::Cache::Response + include ::MonitorMixin + + # @return [Response] a new instance of Response + # @yield [_self] + # @yieldparam _self [ActionDispatch::Response] the object that the method was called on + # + # source://actionpack//lib/action_dispatch/http/response.rb#161 + def initialize(status = T.unsafe(nil), header = T.unsafe(nil), body = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/response.rb#71 + def [](*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/http/response.rb#71 + def []=(*_arg0, **_arg1, &_arg2); end + + # Aliasing these off because AD::Http::Cache::Response defines them. + # + # source://rack/2.2.6.4/lib/rack/response.rb#229 + def _cache_control; end + + # source://rack/2.2.6.4/lib/rack/response.rb#233 + def _cache_control=(v); end + + # source://actionpack//lib/action_dispatch/http/response.rb#370 + def abort; end + + # source://actionpack//lib/action_dispatch/http/response.rb#183 + def await_commit; end + + # source://actionpack//lib/action_dispatch/http/response.rb#189 + def await_sent; end + + # Returns the content of the response as a string. This contains the contents + # of any calls to render. + # + # source://actionpack//lib/action_dispatch/http/response.rb#304 + def body; end + + # Allows you to manually set or override the response body. + # + # source://actionpack//lib/action_dispatch/http/response.rb#313 + def body=(body); end + + # source://actionpack//lib/action_dispatch/http/response.rb#357 + def body_parts; end + + # The charset of the response. HTML wants to know the encoding of the + # content you're giving them, so we need to send that along. + # + # source://actionpack//lib/action_dispatch/http/response.rb#274 + def charset; end + + # Sets the HTTP character set. In case of +nil+ parameter + # it sets the charset to +default_charset+. + # + # response.charset = 'utf-16' # => 'utf-16' + # response.charset = nil # => 'utf-8' + # + # source://actionpack//lib/action_dispatch/http/response.rb#263 + def charset=(charset); end + + # source://actionpack//lib/action_dispatch/http/response.rb#366 + def close; end + + # Returns a string to ensure compatibility with Net::HTTPResponse. + # + # source://actionpack//lib/action_dispatch/http/response.rb#285 + def code; end + + # source://actionpack//lib/action_dispatch/http/response.rb#193 + def commit!; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/response.rb#217 + def committed?; end + + # Content type of response. + # + # source://actionpack//lib/action_dispatch/http/response.rb#243 + def content_type; end + + # Sets the HTTP response's content MIME type. For example, in the controller + # you could write this: + # + # response.content_type = "text/plain" + # + # If a character set has been defined for this response (see charset=) then + # the character set information will also be included in the content type + # information. + # + # source://actionpack//lib/action_dispatch/http/response.rb#233 + def content_type=(content_type); end + + # Returns the response cookies, converted to a Hash of (name => value) pairs + # + # assert_equal 'AuthorOfNewPage', r.cookies['author'] + # + # source://actionpack//lib/action_dispatch/http/response.rb#394 + def cookies; end + + # source://actionpack//lib/action_dispatch/http/response.rb#85 + def default_charset; end + + # source://actionpack//lib/action_dispatch/http/response.rb#85 + def default_charset=(val); end + + # source://actionpack//lib/action_dispatch/http/response.rb#86 + def default_headers; end + + # source://actionpack//lib/action_dispatch/http/response.rb#86 + def default_headers=(val); end + + # source://actionpack//lib/action_dispatch/http/response.rb#181 + def delete_header(key); end + + # source://actionpack//lib/action_dispatch/http/response.rb#73 + def each(&block); end + + # source://actionpack//lib/action_dispatch/http/response.rb#179 + def get_header(key); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/response.rb#178 + def has_header?(key); end + + # Get headers for this response. + # + # source://actionpack//lib/action_dispatch/http/response.rb#67 + def header; end + + # Get headers for this response. + # + # source://actionpack//lib/action_dispatch/http/response.rb#67 + def headers; end + + # Media type of response. + # + # source://actionpack//lib/action_dispatch/http/response.rb#248 + def media_type; end + + # Returns the corresponding message for the current HTTP status code: + # + # response.status = 200 + # response.message # => "OK" + # + # response.status = 404 + # response.message # => "Not Found" + # + # source://actionpack//lib/action_dispatch/http/response.rb#297 + def message; end + + # Turns the Response into a Rack-compatible array of the status, headers, + # and body. Allows explicit splatting: + # + # status, headers, body = *response + # + # source://actionpack//lib/action_dispatch/http/response.rb#385 + def prepare!; end + + # The location header we'll be responding with. + # + # source://rack/2.2.6.4/lib/rack/response.rb#204 + def redirect_url; end + + # The request that the response is responding to. + # + # source://actionpack//lib/action_dispatch/http/response.rb#61 + def request; end + + # The request that the response is responding to. + # + # source://actionpack//lib/action_dispatch/http/response.rb#61 + def request=(_arg0); end + + # source://actionpack//lib/action_dispatch/http/response.rb#353 + def reset_body!; end + + # The response code of the request. + # + # source://actionpack//lib/action_dispatch/http/response.rb#280 + def response_code; end + + # Send the file stored at +path+ as the response body. + # + # source://actionpack//lib/action_dispatch/http/response.rb#348 + def send_file(path); end + + # source://actionpack//lib/action_dispatch/http/response.rb#201 + def sending!; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/response.rb#216 + def sending?; end + + # source://actionpack//lib/action_dispatch/http/response.rb#252 + def sending_file=(v); end + + # source://actionpack//lib/action_dispatch/http/response.rb#209 + def sent!; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/response.rb#218 + def sent?; end + + # source://actionpack//lib/action_dispatch/http/response.rb#180 + def set_header(key, v); end + + # The HTTP status code. + # + # source://actionpack//lib/action_dispatch/http/response.rb#64 + def status; end + + # Sets the HTTP status code. + # + # source://actionpack//lib/action_dispatch/http/response.rb#221 + def status=(status); end + + # Returns the corresponding message for the current HTTP status code: + # + # response.status = 200 + # response.message # => "OK" + # + # response.status = 404 + # response.message # => "Not Found" + # + # source://actionpack//lib/action_dispatch/http/response.rb#297 + def status_message; end + + # The underlying body, as a streamable object. + # + # source://actionpack//lib/action_dispatch/http/response.rb#159 + def stream; end + + # Turns the Response into a Rack-compatible array of the status, headers, + # and body. Allows explicit splatting: + # + # status, headers, body = *response + # + # source://actionpack//lib/action_dispatch/http/response.rb#385 + def to_a; end + + # source://actionpack//lib/action_dispatch/http/response.rb#308 + def write(string); end + + private + + # source://actionpack//lib/action_dispatch/http/response.rb#466 + def assign_default_content_type_and_charset!; end + + # source://actionpack//lib/action_dispatch/http/response.rb#438 + def before_committed; end + + # source://actionpack//lib/action_dispatch/http/response.rb#446 + def before_sending; end + + # source://actionpack//lib/action_dispatch/http/response.rb#458 + def build_buffer(response, body); end + + # source://actionpack//lib/action_dispatch/http/response.rb#510 + def handle_no_content!; end + + # source://actionpack//lib/action_dispatch/http/response.rb#462 + def munge_body_object(body); end + + # source://actionpack//lib/action_dispatch/http/response.rb#418 + def parse_content_type(content_type); end + + # Small internal convenience method to get the parsed version of the current + # content type header. + # + # source://actionpack//lib/action_dispatch/http/response.rb#428 + def parsed_content_type_header; end + + # source://actionpack//lib/action_dispatch/http/response.rb#517 + def rack_response(status, header); end + + # source://actionpack//lib/action_dispatch/http/response.rb#432 + def set_content_type(content_type, charset); end + + class << self + # source://actionpack//lib/action_dispatch/http/response.rb#149 + def create(status = T.unsafe(nil), header = T.unsafe(nil), body = T.unsafe(nil), default_headers: T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/response.rb#85 + def default_charset; end + + # source://actionpack//lib/action_dispatch/http/response.rb#85 + def default_charset=(val); end + + # source://actionpack//lib/action_dispatch/http/response.rb#86 + def default_headers; end + + # source://actionpack//lib/action_dispatch/http/response.rb#86 + def default_headers=(val); end + + # source://actionpack//lib/action_dispatch/http/response.rb#154 + def merge_default_headers(original, default); end + end +end + +# source://actionpack//lib/action_dispatch/http/response.rb#97 +class ActionDispatch::Response::Buffer + # @return [Buffer] a new instance of Buffer + # + # source://actionpack//lib/action_dispatch/http/response.rb#98 + def initialize(response, buf); end + + # source://actionpack//lib/action_dispatch/http/response.rb#131 + def abort; end + + # source://actionpack//lib/action_dispatch/http/response.rb#105 + def body; end + + # source://actionpack//lib/action_dispatch/http/response.rb#134 + def close; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/response.rb#139 + def closed?; end + + # source://actionpack//lib/action_dispatch/http/response.rb#121 + def each(&block); end + + # @raise [IOError] + # + # source://actionpack//lib/action_dispatch/http/response.rb#113 + def write(string); end + + private + + # source://actionpack//lib/action_dispatch/http/response.rb#144 + def each_chunk(&block); end +end + +# source://actionpack//lib/action_dispatch/http/response.rb#80 +ActionDispatch::Response::CONTENT_TYPE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/response.rb#412 +ActionDispatch::Response::CONTENT_TYPE_PARSER = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/http/response.rb#409 +class ActionDispatch::Response::ContentTypeHeader < ::Struct + # Returns the value of attribute charset + # + # @return [Object] the current value of charset + def charset; end + + # Sets the attribute charset + # + # @param value [Object] the value to set the attribute charset to. + # @return [Object] the newly set value + def charset=(_); end + + # Returns the value of attribute mime_type + # + # @return [Object] the current value of mime_type + def mime_type; end + + # Sets the attribute mime_type + # + # @param value [Object] the value to set the attribute mime_type to. + # @return [Object] the newly set value + def mime_type=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Avoid having to pass an open file handle as the response body. +# Rack::Sendfile will usually intercept the response and uses +# the path directly, so there is no reason to open the file. +# +# source://actionpack//lib/action_dispatch/http/response.rb#326 +class ActionDispatch::Response::FileBody + # @return [FileBody] a new instance of FileBody + # + # source://actionpack//lib/action_dispatch/http/response.rb#329 + def initialize(path); end + + # source://actionpack//lib/action_dispatch/http/response.rb#333 + def body; end + + # Stream the file's contents if Rack::Sendfile isn't present. + # + # source://actionpack//lib/action_dispatch/http/response.rb#338 + def each; end + + # source://actionpack//lib/action_dispatch/http/response.rb#327 + def to_path; end +end + +# source://actionpack//lib/action_dispatch/http/response.rb#37 +class ActionDispatch::Response::Header + # @return [Header] a new instance of Header + # + # source://actionpack//lib/action_dispatch/http/response.rb#38 + def initialize(response, header); end + + # source://actionpack//lib/action_dispatch/http/response.rb#43 + def []=(k, v); end + + # source://actionpack//lib/action_dispatch/http/response.rb#51 + def merge(other); end + + # source://actionpack//lib/action_dispatch/http/response.rb#55 + def to_hash; end +end + +# source://actionpack//lib/action_dispatch/http/response.rb#82 +ActionDispatch::Response::LOCATION = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/response.rb#83 +ActionDispatch::Response::NO_CONTENT_CODES = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/http/response.rb#410 +ActionDispatch::Response::NullContentTypeHeader = T.let(T.unsafe(nil), ActionDispatch::Response::ContentTypeHeader) + +# source://actionpack//lib/action_dispatch/http/response.rb#474 +class ActionDispatch::Response::RackBody + # @return [RackBody] a new instance of RackBody + # + # source://actionpack//lib/action_dispatch/http/response.rb#475 + def initialize(response); end + + # source://actionpack//lib/action_dispatch/http/response.rb#489 + def body; end + + # source://actionpack//lib/action_dispatch/http/response.rb#483 + def close; end + + # source://actionpack//lib/action_dispatch/http/response.rb#479 + def each(*args, &block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/response.rb#493 + def respond_to?(method, include_private = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/response.rb#505 + def to_ary; end + + # source://actionpack//lib/action_dispatch/http/response.rb#501 + def to_path; end +end + +# source://actionpack//lib/action_dispatch/http/response.rb#81 +ActionDispatch::Response::SET_COOKIE = T.let(T.unsafe(nil), String) + +# The routing module provides URL rewriting in native Ruby. It's a way to +# redirect incoming requests to controllers and actions. This replaces +# mod_rewrite rules. Best of all, Rails' \Routing works with any web server. +# Routes are defined in config/routes.rb. +# +# Think of creating routes as drawing a map for your requests. The map tells +# them where to go based on some predefined pattern: +# +# Rails.application.routes.draw do +# Pattern 1 tells some request to go to one place +# Pattern 2 tell them to go to another +# ... +# end +# +# The following symbols are special: +# +# :controller maps to your controller name +# :action maps to an action with your controllers +# +# Other names simply map to a parameter as in the case of :id. +# +# == Resources +# +# Resource routing allows you to quickly declare all of the common routes +# for a given resourceful controller. Instead of declaring separate routes +# for your +index+, +show+, +new+, +edit+, +create+, +update+, and +destroy+ +# actions, a resourceful route declares them in a single line of code: +# +# resources :photos +# +# Sometimes, you have a resource that clients always look up without +# referencing an ID. A common example, /profile always shows the profile of +# the currently logged in user. In this case, you can use a singular resource +# to map /profile (rather than /profile/:id) to the show action. +# +# resource :profile +# +# It's common to have resources that are logically children of other +# resources: +# +# resources :magazines do +# resources :ads +# end +# +# You may wish to organize groups of controllers under a namespace. Most +# commonly, you might group a number of administrative controllers under +# an +admin+ namespace. You would place these controllers under the +# app/controllers/admin directory, and you can group them together +# in your router: +# +# namespace "admin" do +# resources :posts, :comments +# end +# +# Alternatively, you can add prefixes to your path without using a separate +# directory by using +scope+. +scope+ takes additional options which +# apply to all enclosed routes. +# +# scope path: "/cpanel", as: 'admin' do +# resources :posts, :comments +# end +# +# For more, see Routing::Mapper::Resources#resources, +# Routing::Mapper::Scoping#namespace, and Routing::Mapper::Scoping#scope. +# +# == Non-resourceful routes +# +# For routes that don't fit the resources mold, you can use the HTTP helper +# methods get, post, patch, put and delete. +# +# get 'post/:id', to: 'posts#show' +# post 'post/:id', to: 'posts#create_comment' +# +# Now, if you POST to /posts/:id, it will route to the create_comment action. A GET on the same +# URL will route to the show action. +# +# If your route needs to respond to more than one HTTP method (or all methods) then using the +# :via option on match is preferable. +# +# match 'post/:id', to: 'posts#show', via: [:get, :post] +# +# == Named routes +# +# Routes can be named by passing an :as option, +# allowing for easy reference within your source as +name_of_route_url+ +# for the full URL and +name_of_route_path+ for the URI path. +# +# Example: +# +# # In config/routes.rb +# get '/login', to: 'accounts#login', as: 'login' +# +# # With render, redirect_to, tests, etc. +# redirect_to login_url +# +# Arguments can be passed as well. +# +# redirect_to show_item_path(id: 25) +# +# Use root as a shorthand to name a route for the root path "/". +# +# # In config/routes.rb +# root to: 'blogs#index' +# +# # would recognize http://www.example.com/ as +# params = { controller: 'blogs', action: 'index' } +# +# # and provide these named routes +# root_url # => 'http://www.example.com/' +# root_path # => '/' +# +# Note: when using +controller+, the route is simply named after the +# method you call on the block parameter rather than map. +# +# # In config/routes.rb +# controller :blog do +# get 'blog/show', to: :list +# get 'blog/delete', to: :delete +# get 'blog/edit', to: :edit +# end +# +# # provides named routes for show, delete, and edit +# link_to @article.title, blog_show_path(id: @article.id) +# +# == Pretty URLs +# +# Routes can generate pretty URLs. For example: +# +# get '/articles/:year/:month/:day', to: 'articles#find_by_id', constraints: { +# year: /\d{4}/, +# month: /\d{1,2}/, +# day: /\d{1,2}/ +# } +# +# Using the route above, the URL "http://localhost:3000/articles/2005/11/06" +# maps to +# +# params = {year: '2005', month: '11', day: '06'} +# +# == Regular Expressions and parameters +# You can specify a regular expression to define a format for a parameter. +# +# controller 'geocode' do +# get 'geocode/:postalcode', to: :show, constraints: { +# postalcode: /\d{5}(-\d{4})?/ +# } +# end +# +# Constraints can include the 'ignorecase' and 'extended syntax' regular +# expression modifiers: +# +# controller 'geocode' do +# get 'geocode/:postalcode', to: :show, constraints: { +# postalcode: /hx\d\d\s\d[a-z]{2}/i +# } +# end +# +# controller 'geocode' do +# get 'geocode/:postalcode', to: :show, constraints: { +# postalcode: /# Postalcode format +# \d{5} #Prefix +# (-\d{4})? #Suffix +# /x +# } +# end +# +# Using the multiline modifier will raise an +ArgumentError+. +# Encoding regular expression modifiers are silently ignored. The +# match will always use the default encoding or ASCII. +# +# == External redirects +# +# You can redirect any path to another path using the redirect helper in your router: +# +# get "/stories", to: redirect("/posts") +# +# == Unicode character routes +# +# You can specify unicode character routes in your router: +# +# get "こんにちは", to: "welcome#index" +# +# == Routing to Rack Applications +# +# Instead of a String, like posts#index, which corresponds to the +# index action in the PostsController, you can specify any Rack application +# as the endpoint for a matcher: +# +# get "/application.js", to: Sprockets +# +# == Reloading routes +# +# You can reload routes if you feel you must: +# +# Rails.application.reload_routes! +# +# This will clear all named routes and reload config/routes.rb if the file has been modified from +# last load. To absolutely force reloading, use reload!. +# +# == Testing Routes +# +# The two main methods for testing your routes: +# +# === +assert_routing+ +# +# def test_movie_route_properly_splits +# opts = {controller: "plugin", action: "checkout", id: "2"} +# assert_routing "plugin/checkout/2", opts +# end +# +# +assert_routing+ lets you test whether or not the route properly resolves into options. +# +# === +assert_recognizes+ +# +# def test_route_has_options +# opts = {controller: "plugin", action: "show", id: "12"} +# assert_recognizes opts, "/plugins/show/12" +# end +# +# Note the subtle difference between the two: +assert_routing+ tests that +# a URL fits options while +assert_recognizes+ tests that a URL +# breaks into parameters properly. +# +# In tests you can simply pass the URL or named route to +get+ or +post+. +# +# def send_to_jail +# get '/jail' +# assert_response :success +# end +# +# def goes_to_login +# get login_url +# #... +# end +# +# == View a list of all your routes +# +# rails routes +# +# Target a specific controller with -c, or grep routes +# using -g. Useful in conjunction with --expanded +# which displays routes vertically. +# +# source://actionpack//lib/action_dispatch/routing.rb#248 +module ActionDispatch::Routing + extend ::ActiveSupport::Autoload +end + +# source://actionpack//lib/action_dispatch/routing/inspector.rb#129 +module ActionDispatch::Routing::ConsoleFormatter; end + +# source://actionpack//lib/action_dispatch/routing/inspector.rb#130 +class ActionDispatch::Routing::ConsoleFormatter::Base + # @return [Base] a new instance of Base + # + # source://actionpack//lib/action_dispatch/routing/inspector.rb#131 + def initialize; end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#145 + def header(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#148 + def no_routes(routes, filter); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#135 + def result; end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#142 + def section(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#139 + def section_title(title); end +end + +# source://actionpack//lib/action_dispatch/routing/inspector.rb#202 +class ActionDispatch::Routing::ConsoleFormatter::Expanded < ::ActionDispatch::Routing::ConsoleFormatter::Base + # @return [Expanded] a new instance of Expanded + # + # source://actionpack//lib/action_dispatch/routing/inspector.rb#203 + def initialize(width: T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#212 + def section(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#208 + def section_title(title); end + + private + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#217 + def draw_expanded_section(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#229 + def route_header(index:); end +end + +# source://actionpack//lib/action_dispatch/routing/inspector.rb#166 +class ActionDispatch::Routing::ConsoleFormatter::Sheet < ::ActionDispatch::Routing::ConsoleFormatter::Base + # source://actionpack//lib/action_dispatch/routing/inspector.rb#175 + def header(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#171 + def section(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#167 + def section_title(title); end + + private + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#189 + def draw_header(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#180 + def draw_section(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#195 + def widths(routes); end +end + +# source://actionpack//lib/action_dispatch/routing/endpoint.rb#5 +class ActionDispatch::Routing::Endpoint + # source://actionpack//lib/action_dispatch/routing/endpoint.rb#9 + def app; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/endpoint.rb#6 + def dispatcher?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/endpoint.rb#12 + def engine?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/endpoint.rb#8 + def matches?(req); end + + # source://actionpack//lib/action_dispatch/routing/endpoint.rb#10 + def rack_app; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/endpoint.rb#7 + def redirect?; end +end + +# source://actionpack//lib/action_dispatch/routing.rb#258 +ActionDispatch::Routing::HTTP_METHODS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/routing/inspector.rb#235 +class ActionDispatch::Routing::HtmlTableFormatter + # @return [HtmlTableFormatter] a new instance of HtmlTableFormatter + # + # source://actionpack//lib/action_dispatch/routing/inspector.rb#236 + def initialize(view); end + + # The header is part of the HTML page, so we don't construct it here. + # + # source://actionpack//lib/action_dispatch/routing/inspector.rb#250 + def header(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#253 + def no_routes(*_arg0); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#266 + def result; end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#245 + def section(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#241 + def section_title(title); end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#12 +class ActionDispatch::Routing::Mapper + include ::ActionDispatch::Routing::Mapper::Base + include ::ActionDispatch::Routing::Mapper::HttpHelpers + include ::ActionDispatch::Routing::Redirection + include ::ActionDispatch::Routing::Mapper::Scoping + include ::ActionDispatch::Routing::Mapper::Concerns + include ::ActionDispatch::Routing::Mapper::Resources + include ::ActionDispatch::Routing::Mapper::CustomUrls + + # @return [Mapper] a new instance of Mapper + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2279 + def initialize(set); end + + class << self + # source://actionpack//lib/action_dispatch/routing/mapper.rb#381 + def normalize_name(name); end + + # Invokes Journey::Router::Utils.normalize_path, then ensures that + # /(:locale) becomes (/:locale). Except for root cases, where the + # former is the correct one. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#364 + def normalize_path(path); end + end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#385 +module ActionDispatch::Routing::Mapper::Base + # source://actionpack//lib/action_dispatch/routing/mapper.rb#618 + def default_url_options(options); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#618 + def default_url_options=(options); end + + # Query if the following named route was already defined. + # + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#630 + def has_named_route?(name); end + + # Matches a URL pattern to one or more routes. + # + # You should not use the +match+ method in your router + # without specifying an HTTP method. + # + # If you want to expose your action to both GET and POST, use: + # + # # sets :controller, :action, and :id in params + # match ':controller/:action/:id', via: [:get, :post] + # + # Note that +:controller+, +:action+, and +:id+ are interpreted as URL + # query parameters and thus available through +params+ in an action. + # + # If you want to expose your action to GET, use +get+ in the router: + # + # Instead of: + # + # match ":controller/:action/:id" + # + # Do: + # + # get ":controller/:action/:id" + # + # Two of these symbols are special, +:controller+ maps to the controller + # and +:action+ to the controller's action. A pattern can also map + # wildcard segments (globs) to params: + # + # get 'songs/*category/:title', to: 'songs#show' + # + # # 'songs/rock/classic/stairway-to-heaven' sets + # # params[:category] = 'rock/classic' + # # params[:title] = 'stairway-to-heaven' + # + # To match a wildcard parameter, it must have a name assigned to it. + # Without a variable name to attach the glob parameter to, the route + # can't be parsed. + # + # When a pattern points to an internal route, the route's +:action+ and + # +:controller+ should be set in options or hash shorthand. Examples: + # + # match 'photos/:id' => 'photos#show', via: :get + # match 'photos/:id', to: 'photos#show', via: :get + # match 'photos/:id', controller: 'photos', action: 'show', via: :get + # + # A pattern can also point to a +Rack+ endpoint i.e. anything that + # responds to +call+: + # + # match 'photos/:id', to: -> (hash) { [200, {}, ["Coming soon"]] }, via: :get + # match 'photos/:id', to: PhotoRackApp, via: :get + # # Yes, controller actions are just rack endpoints + # match 'photos/:id', to: PhotosController.action(:show), via: :get + # + # Because requesting various HTTP verbs with a single action has security + # implications, you must either specify the actions in + # the via options or use one of the HttpHelpers[rdoc-ref:HttpHelpers] + # instead +match+ + # + # === Options + # + # Any options not seen here are passed on as params with the URL. + # + # [:controller] + # The route's controller. + # + # [:action] + # The route's action. + # + # [:param] + # Overrides the default resource identifier +:id+ (name of the + # dynamic segment used to generate the routes). + # You can access that segment from your controller using + # params[<:param>]. + # In your router: + # + # resources :users, param: :name + # + # The +users+ resource here will have the following routes generated for it: + # + # GET /users(.:format) + # POST /users(.:format) + # GET /users/new(.:format) + # GET /users/:name/edit(.:format) + # GET /users/:name(.:format) + # PATCH/PUT /users/:name(.:format) + # DELETE /users/:name(.:format) + # + # You can override ActiveRecord::Base#to_param of a related + # model to construct a URL: + # + # class User < ActiveRecord::Base + # def to_param + # name + # end + # end + # + # user = User.find_by(name: 'Phusion') + # user_path(user) # => "/users/Phusion" + # + # [:path] + # The path prefix for the routes. + # + # [:module] + # The namespace for :controller. + # + # match 'path', to: 'c#a', module: 'sekret', controller: 'posts', via: :get + # # => Sekret::PostsController + # + # See Scoping#namespace for its scope equivalent. + # + # [:as] + # The name used to generate routing helpers. + # + # [:via] + # Allowed HTTP verb(s) for route. + # + # match 'path', to: 'c#a', via: :get + # match 'path', to: 'c#a', via: [:get, :post] + # match 'path', to: 'c#a', via: :all + # + # [:to] + # Points to a +Rack+ endpoint. Can be an object that responds to + # +call+ or a string representing a controller's action. + # + # match 'path', to: 'controller#action', via: :get + # match 'path', to: -> (env) { [200, {}, ["Success!"]] }, via: :get + # match 'path', to: RackApp, via: :get + # + # [:on] + # Shorthand for wrapping routes in a specific RESTful context. Valid + # values are +:member+, +:collection+, and +:new+. Only use within + # resource(s) block. For example: + # + # resource :bar do + # match 'foo', to: 'c#a', on: :member, via: [:get, :post] + # end + # + # Is equivalent to: + # + # resource :bar do + # member do + # match 'foo', to: 'c#a', via: [:get, :post] + # end + # end + # + # [:constraints] + # Constrains parameters with a hash of regular expressions + # or an object that responds to matches?. In addition, constraints + # other than path can also be specified with any object + # that responds to === (e.g. String, Array, Range, etc.). + # + # match 'path/:id', constraints: { id: /[A-Z]\d{5}/ }, via: :get + # + # match 'json_only', constraints: { format: 'json' }, via: :get + # + # class PermitList + # def matches?(request) request.remote_ip == '1.2.3.4' end + # end + # match 'path', to: 'c#a', constraints: PermitList.new, via: :get + # + # See Scoping#constraints for more examples with its scope + # equivalent. + # + # [:defaults] + # Sets defaults for parameters + # + # # Sets params[:format] to 'jpg' by default + # match 'path', to: 'c#a', defaults: { format: 'jpg' }, via: :get + # + # See Scoping#defaults for its scope equivalent. + # + # [:anchor] + # Boolean to anchor a match pattern. Default is true. When set to + # false, the pattern matches any request prefixed with the given path. + # + # # Matches any request starting with 'path' + # match 'path', to: 'c#a', anchor: false, via: :get + # + # [:format] + # Allows you to specify the default value for optional +format+ + # segment or disable it by supplying +false+. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#566 + def match(path, options = T.unsafe(nil)); end + + # Mount a Rack-based application to be used within the application. + # + # mount SomeRackApp, at: "some_route" + # + # Alternatively: + # + # mount(SomeRackApp => "some_route") + # + # For options, see +match+, as +mount+ uses it internally. + # + # All mounted applications come with routing helpers to access them. + # These are named after the class specified, so for the above example + # the helper is either +some_rack_app_path+ or +some_rack_app_url+. + # To customize this helper's name, use the +:as+ option: + # + # mount(SomeRackApp => "some_route", as: "exciting") + # + # This will generate the +exciting_path+ and +exciting_url+ helpers + # which can be used to navigate to this mounted app. + # + # @raise [ArgumentError] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#588 + def mount(app, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#623 + def with_default_scope(scope, &block); end + + private + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#639 + def app_name(app, rails_app); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#648 + def define_generate_prefix(app, name); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#635 + def rails_app?(app); end +end + +# Routing Concerns allow you to declare common routes that can be reused +# inside others resources and routes. +# +# concern :commentable do +# resources :comments +# end +# +# concern :image_attachable do +# resources :images, only: :index +# end +# +# These concerns are used in Resources routing: +# +# resources :messages, concerns: [:commentable, :image_attachable] +# +# or in a scope or namespace: +# +# namespace :posts do +# concerns :commentable +# end +# +# source://actionpack//lib/action_dispatch/routing/mapper.rb#1991 +module ActionDispatch::Routing::Mapper::Concerns + # Define a routing concern using a name. + # + # Concerns may be defined inline, using a block, or handled by + # another object, by passing that object as the second parameter. + # + # The concern object, if supplied, should respond to call, + # which will receive two parameters: + # + # * The current mapper + # * A hash of options which the concern object may use + # + # Options may also be used by concerns defined in a block by accepting + # a block parameter. So, using a block, you might do something as + # simple as limit the actions available on certain resources, passing + # standard resource options through the concern: + # + # concern :commentable do |options| + # resources :comments, options + # end + # + # resources :posts, concerns: :commentable + # resources :archived_posts do + # # Don't allow comments on archived posts + # concerns :commentable, only: [:index, :show] + # end + # + # Or, using a callable object, you might implement something more + # specific to your application, which would be out of place in your + # routes file. + # + # # purchasable.rb + # class Purchasable + # def initialize(defaults = {}) + # @defaults = defaults + # end + # + # def call(mapper, options = {}) + # options = @defaults.merge(options) + # mapper.resources :purchases + # mapper.resources :receipts + # mapper.resources :returns if options[:returnable] + # end + # end + # + # # routes.rb + # concern :purchasable, Purchasable.new(returnable: true) + # + # resources :toys, concerns: :purchasable + # resources :electronics, concerns: :purchasable + # resources :pets do + # concerns :purchasable, returnable: false + # end + # + # Any routing helpers can be used inside a concern. If using a + # callable, they're accessible from the Mapper that's passed to + # call. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2048 + def concern(name, callable = T.unsafe(nil), &block); end + + # Use the named concerns + # + # resources :posts do + # concerns :commentable + # end + # + # Concerns also work in any routes helper that you want to use: + # + # namespace :posts do + # concerns :commentable + # end + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2064 + def concerns(*args); end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#15 +class ActionDispatch::Routing::Mapper::Constraints < ::ActionDispatch::Routing::Endpoint + # @return [Constraints] a new instance of Constraints + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#21 + def initialize(app, constraints, strategy); end + + # Returns the value of attribute app. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#16 + def app; end + + # Returns the value of attribute constraints. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#16 + def constraints; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#36 + def dispatcher?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#38 + def matches?(req); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#45 + def serve(req); end + + private + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#52 + def constraint_args(constraint, request); end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#19 +ActionDispatch::Routing::Mapper::Constraints::CALL = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#18 +ActionDispatch::Routing::Mapper::Constraints::SERVE = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2076 +module ActionDispatch::Routing::Mapper::CustomUrls + # Define custom URL helpers that will be added to the application's + # routes. This allows you to override and/or replace the default behavior + # of routing helpers, e.g: + # + # direct :homepage do + # "https://rubyonrails.org" + # end + # + # direct :commentable do |model| + # [ model, anchor: model.dom_id ] + # end + # + # direct :main do + # { controller: "pages", action: "index", subdomain: "www" } + # end + # + # The return value from the block passed to +direct+ must be a valid set of + # arguments for +url_for+ which will actually build the URL string. This can + # be one of the following: + # + # * A string, which is treated as a generated URL + # * A hash, e.g. { controller: "pages", action: "index" } + # * An array, which is passed to +polymorphic_url+ + # * An Active Model instance + # * An Active Model class + # + # NOTE: Other URL helpers can be called in the block but be careful not to invoke + # your custom URL helper again otherwise it will result in a stack overflow error. + # + # You can also specify default options that will be passed through to + # your URL helper definition, e.g: + # + # direct :browse, page: 1, size: 10 do |options| + # [ :products, options.merge(params.permit(:page, :size).to_h.symbolize_keys) ] + # end + # + # In this instance the +params+ object comes from the context in which the + # block is executed, e.g. generating a URL inside a controller action or a view. + # If the block is executed where there isn't a +params+ object such as this: + # + # Rails.application.routes.url_helpers.browse_path + # + # then it will raise a +NameError+. Because of this you need to be aware of the + # context in which you will use your custom URL helper when defining it. + # + # NOTE: The +direct+ method can't be used inside of a scope block such as + # +namespace+ or +scope+ and will raise an error if it detects that it is. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2124 + def direct(name, options = T.unsafe(nil), &block); end + + # Define custom polymorphic mappings of models to URLs. This alters the + # behavior of +polymorphic_url+ and consequently the behavior of + # +link_to+ and +form_for+ when passed a model instance, e.g: + # + # resource :basket + # + # resolve "Basket" do + # [:basket] + # end + # + # This will now generate "/basket" when a +Basket+ instance is passed to + # +link_to+ or +form_for+ instead of the standard "/baskets/:id". + # + # NOTE: This custom behavior only applies to simple polymorphic URLs where + # a single model instance is passed and not more complicated forms, e.g: + # + # # config/routes.rb + # resource :profile + # namespace :admin do + # resources :users + # end + # + # resolve("User") { [:profile] } + # + # # app/views/application/_menu.html.erb + # link_to "Profile", @current_user + # link_to "Profile", [:admin, @current_user] + # + # The first +link_to+ will generate "/profile" but the second will generate + # the standard polymorphic URL of "/admin/users/1". + # + # You can pass options to a polymorphic mapping - the arity for the block + # needs to be two as the instance is passed as the first argument, e.g: + # + # resolve "Basket", anchor: "items" do |basket, options| + # [:basket, options] + # end + # + # This generates the URL "/basket#items" because when the last item in an + # array passed to +polymorphic_url+ is a hash then it's treated as options + # to the URL helper that gets called. + # + # NOTE: The +resolve+ method can't be used inside of a scope block such as + # +namespace+ or +scope+ and will raise an error if it detects that it is. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2176 + def resolve(*args, &block); end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#682 +module ActionDispatch::Routing::Mapper::HttpHelpers + # Define a route that only recognizes HTTP DELETE. + # For supported arguments, see match[rdoc-ref:Base#match] + # + # delete 'broccoli', to: 'food#broccoli' + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#719 + def delete(*args, &block); end + + # Define a route that only recognizes HTTP GET. + # For supported arguments, see match[rdoc-ref:Base#match] + # + # get 'bacon', to: 'food#bacon' + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#687 + def get(*args, &block); end + + # Define a route that only recognizes HTTP OPTIONS. + # For supported arguments, see match[rdoc-ref:Base#match] + # + # options 'carrots', to: 'food#carrots' + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#727 + def options(*args, &block); end + + # Define a route that only recognizes HTTP PATCH. + # For supported arguments, see match[rdoc-ref:Base#match] + # + # patch 'bacon', to: 'food#bacon' + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#703 + def patch(*args, &block); end + + # Define a route that only recognizes HTTP POST. + # For supported arguments, see match[rdoc-ref:Base#match] + # + # post 'bacon', to: 'food#bacon' + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#695 + def post(*args, &block); end + + # Define a route that only recognizes HTTP PUT. + # For supported arguments, see match[rdoc-ref:Base#match] + # + # put 'bacon', to: 'food#bacon' + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#711 + def put(*args, &block); end + + private + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#732 + def map_method(method, args, &block); end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#69 +class ActionDispatch::Routing::Mapper::Mapping + # @return [Mapping] a new instance of Mapping + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#118 + def initialize(set:, ast:, controller:, default_action:, to:, formatted:, via:, options_constraints:, anchor:, scope_params:, options:); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#176 + def application; end + + # Returns the value of attribute ast. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 + def ast; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#180 + def conditions; end + + # Returns the value of attribute default_action. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 + def default_action; end + + # Returns the value of attribute default_controller. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 + def default_controller; end + + # Returns the value of attribute defaults. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 + def defaults; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#169 + def make_route(name, precedence); end + + # Returns the value of attribute path. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 + def path; end + + # Returns the value of attribute required_defaults. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 + def required_defaults; end + + # Returns the value of attribute requirements. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 + def requirements; end + + # Returns the value of attribute scope_options. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 + def scope_options; end + + # Returns the value of attribute to. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#73 + def to; end + + private + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#316 + def add_controller_module(controller, modyoule); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#269 + def app(blocks); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#335 + def blocks(callable_constraint); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#184 + def build_conditions(current_conditions, request_class); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#281 + def check_controller_and_action(path_params, controller, action); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#296 + def check_part(name, part, path_params, hash); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#342 + def constraints(options, path_params); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#356 + def dispatcher(raise_on_name_error); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#199 + def intern(object); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#265 + def normalize_defaults(options); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#233 + def normalize_format(formatted); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#203 + def normalize_options!(options, path_params, modyoule); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#193 + def request_method; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#227 + def split_constraints(path_params, constraints); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#308 + def split_to(to); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#328 + def translate_controller(controller); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#249 + def verify_regexp_requirements(requirements, wildcard_options); end + + class << self + # source://actionpack//lib/action_dispatch/routing/mapper.rb#76 + def build(scope, set, ast, controller, default_action, to, via, formatted, options_constraints, anchor, options); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#90 + def check_via(via); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#102 + def normalize_path(path, format); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#114 + def optional_format?(path, format); end + end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#70 +ActionDispatch::Routing::Mapper::Mapping::ANCHOR_CHARACTERS_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#167 +ActionDispatch::Routing::Mapper::Mapping::JOINED_SEPARATORS = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#71 +ActionDispatch::Routing::Mapper::Mapping::OPTIONAL_FORMAT_REGEX = T.let(T.unsafe(nil), Regexp) + +# Resource routing allows you to quickly declare all of the common routes +# for a given resourceful controller. Instead of declaring separate routes +# for your +index+, +show+, +new+, +edit+, +create+, +update+, and +destroy+ +# actions, a resourceful route declares them in a single line of code: +# +# resources :photos +# +# Sometimes, you have a resource that clients always look up without +# referencing an ID. A common example, /profile always shows the profile of +# the currently logged in user. In this case, you can use a singular resource +# to map /profile (rather than /profile/:id) to the show action. +# +# resource :profile +# +# It's common to have resources that are logically children of other +# resources: +# +# resources :magazines do +# resources :ads +# end +# +# You may wish to organize groups of controllers under a namespace. Most +# commonly, you might group a number of administrative controllers under +# an +admin+ namespace. You would place these controllers under the +# app/controllers/admin directory, and you can group them together +# in your router: +# +# namespace "admin" do +# resources :posts, :comments +# end +# +# By default the +:id+ parameter doesn't accept dots. If you need to +# use dots as part of the +:id+ parameter add a constraint which +# overrides this restriction, e.g: +# +# resources :articles, id: /[^\/]+/ +# +# This allows any character other than a slash as part of your +:id+. +# +# source://actionpack//lib/action_dispatch/routing/mapper.rb#1122 +module ActionDispatch::Routing::Mapper::Resources + # To add a route to the collection: + # + # resources :photos do + # collection do + # get 'search' + # end + # end + # + # This will enable Rails to recognize paths such as /photos/search + # with GET, and route to the search action of +PhotosController+. It will also + # create the search_photos_url and search_photos_path + # route helpers. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1500 + def collection(&block); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1587 + def draw(name); end + + # Matches a URL pattern to one or more routes. + # For more information, see match[rdoc-ref:Base#match]. + # + # match 'path' => 'controller#action', via: :patch + # match 'path', to: 'controller#action', via: :post + # match 'path', 'otherpath', on: :member, via: :get + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1609 + def match(path, *rest, &block); end + + # To add a member route, add a member block into the resource block: + # + # resources :photos do + # member do + # get 'preview' + # end + # end + # + # This will recognize /photos/1/preview with GET, and route to the + # preview action of +PhotosController+. It will also create the + # preview_photo_url and preview_photo_path helpers. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1521 + def member(&block); end + + # See ActionDispatch::Routing::Mapper::Scoping#namespace. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1568 + def namespace(path, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1547 + def nested(&block); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1537 + def new(&block); end + + # Sometimes, you have a resource that clients always look up without + # referencing an ID. A common example, /profile always shows the + # profile of the currently logged in user. In this case, you can use + # a singular resource to map /profile (rather than /profile/:id) to + # the show action: + # + # resource :profile + # + # This creates six different routes in your application, all mapping to + # the +Profiles+ controller (note that the controller is named after + # the plural): + # + # GET /profile/new + # GET /profile + # GET /profile/edit + # PATCH/PUT /profile + # DELETE /profile + # POST /profile + # + # If you want instances of a model to work with this resource via + # record identification (e.g. in +form_with+ or +redirect_to+), you + # will need to call resolve[rdoc-ref:CustomUrls#resolve]: + # + # resource :profile + # resolve('Profile') { [:profile] } + # + # # Enables this to work with singular routes: + # form_with(model: @profile) {} + # + # === Options + # Takes same options as resources[rdoc-ref:#resources] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1292 + def resource(*resources, &block); end + + # In Rails, a resourceful route provides a mapping between HTTP verbs + # and URLs and controller actions. By convention, each action also maps + # to particular CRUD operations in a database. A single entry in the + # routing file, such as + # + # resources :photos + # + # creates seven different routes in your application, all mapping to + # the +Photos+ controller: + # + # GET /photos + # GET /photos/new + # POST /photos + # GET /photos/:id + # GET /photos/:id/edit + # PATCH/PUT /photos/:id + # DELETE /photos/:id + # + # Resources can also be nested infinitely by using this block syntax: + # + # resources :photos do + # resources :comments + # end + # + # This generates the following comments routes: + # + # GET /photos/:photo_id/comments + # GET /photos/:photo_id/comments/new + # POST /photos/:photo_id/comments + # GET /photos/:photo_id/comments/:id + # GET /photos/:photo_id/comments/:id/edit + # PATCH/PUT /photos/:photo_id/comments/:id + # DELETE /photos/:photo_id/comments/:id + # + # === Options + # Takes same options as match[rdoc-ref:Base#match] as well as: + # + # [:path_names] + # Allows you to change the segment component of the +edit+ and +new+ actions. + # Actions not specified are not changed. + # + # resources :posts, path_names: { new: "brand_new" } + # + # The above example will now change /posts/new to /posts/brand_new. + # + # [:path] + # Allows you to change the path prefix for the resource. + # + # resources :posts, path: 'postings' + # + # The resource and all segments will now route to /postings instead of /posts. + # + # [:only] + # Only generate routes for the given actions. + # + # resources :cows, only: :show + # resources :cows, only: [:show, :index] + # + # [:except] + # Generate all routes except for the given actions. + # + # resources :cows, except: :show + # resources :cows, except: [:show, :index] + # + # [:shallow] + # Generates shallow routes for nested resource(s). When placed on a parent resource, + # generates shallow routes for all nested resources. + # + # resources :posts, shallow: true do + # resources :comments + # end + # + # Is the same as: + # + # resources :posts do + # resources :comments, except: [:show, :edit, :update, :destroy] + # end + # resources :comments, only: [:show, :edit, :update, :destroy] + # + # This allows URLs for resources that otherwise would be deeply nested such + # as a comment on a blog post like /posts/a-long-permalink/comments/1234 + # to be shortened to just /comments/1234. + # + # Set shallow: false on a child resource to ignore a parent's shallow parameter. + # + # [:shallow_path] + # Prefixes nested shallow routes with the specified path. + # + # scope shallow_path: "sekret" do + # resources :posts do + # resources :comments, shallow: true + # end + # end + # + # The +comments+ resource here will have the following routes generated for it: + # + # post_comments GET /posts/:post_id/comments(.:format) + # post_comments POST /posts/:post_id/comments(.:format) + # new_post_comment GET /posts/:post_id/comments/new(.:format) + # edit_comment GET /sekret/comments/:id/edit(.:format) + # comment GET /sekret/comments/:id(.:format) + # comment PATCH/PUT /sekret/comments/:id(.:format) + # comment DELETE /sekret/comments/:id(.:format) + # + # [:shallow_prefix] + # Prefixes nested shallow route names with specified prefix. + # + # scope shallow_prefix: "sekret" do + # resources :posts do + # resources :comments, shallow: true + # end + # end + # + # The +comments+ resource here will have the following routes generated for it: + # + # post_comments GET /posts/:post_id/comments(.:format) + # post_comments POST /posts/:post_id/comments(.:format) + # new_post_comment GET /posts/:post_id/comments/new(.:format) + # edit_sekret_comment GET /comments/:id/edit(.:format) + # sekret_comment GET /comments/:id(.:format) + # sekret_comment PATCH/PUT /comments/:id(.:format) + # sekret_comment DELETE /comments/:id(.:format) + # + # [:format] + # Allows you to specify the default value for optional +format+ + # segment or disable it by supplying +false+. + # + # [:param] + # Allows you to override the default param name of +:id+ in the URL. + # + # === Examples + # + # # routes call Admin::PostsController + # resources :posts, module: "admin" + # + # # resource actions are at /admin/posts. + # resources :posts, path: "admin/posts" + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1458 + def resources(*resources, &block); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1257 + def resources_path_names(options); end + + # You can specify what Rails should route "/" to with the root method: + # + # root to: 'pages#main' + # + # For options, see +match+, as +root+ uses it internally. + # + # You can also pass a string which will expand + # + # root 'pages#main' + # + # You should put the root route at the top of config/routes.rb, + # because this means it will be matched first. As this is the most popular route + # of most Rails applications, this is beneficial. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1656 + def root(path, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1576 + def shallow; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1583 + def shallow?; end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1720 + def action_options?(options); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1802 + def action_path(name); end + + # @raise [ArgumentError] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1938 + def add_route(action, controller, options, _path, to, via, formatted, anchor, options_constraints); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1856 + def api_only?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1715 + def apply_action_options(options); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1681 + def apply_common_behavior_for(method, resources, options, &block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1778 + def canonical_action?(action); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1923 + def decomposed_match(path, controller, options, _path, to, via, formatted, anchor, options_constraints); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1908 + def get_to_from_path(path, to, action); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1867 + def map_match(paths, options); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1965 + def match_root_route(options); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1818 + def name_for_action(as, action); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1755 + def nested_options; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1736 + def nested_scope?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1774 + def param_constraint; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1770 + def param_constraint?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1677 + def parent_resource; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1792 + def path_for_action(action, path); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1860 + def path_scope(path); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1806 + def prefix_name_for_action(as, action); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1732 + def resource_method_scope?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1747 + def resource_scope(resource, &block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1728 + def resource_scope?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1724 + def scope_action_options; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1844 + def set_member_mappings_for_resource; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1764 + def shallow_nesting_depth; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1782 + def shallow_scope; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1919 + def using_match_shorthand?(path); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1740 + def with_scope_level(kind); end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#1127 +ActionDispatch::Routing::Mapper::Resources::CANONICAL_ACTIONS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#1126 +ActionDispatch::Routing::Mapper::Resources::RESOURCE_OPTIONS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#1129 +class ActionDispatch::Routing::Mapper::Resources::Resource + # @return [Resource] a new instance of Resource + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1132 + def initialize(entities, api_only, shallow, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1157 + def actions; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1165 + def available_actions; end + + # Checks for uncountable plurals, and appends "_index" if the plural + # and singular form are the same. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1189 + def collection_name; end + + # Returns the value of attribute path. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 + def collection_scope; end + + # Returns the value of attribute controller. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 + def controller; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1149 + def default_actions; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1181 + def member_name; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1199 + def member_scope; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1173 + def name; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1209 + def nested_param; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1213 + def nested_scope; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1205 + def new_scope(new_path); end + + # Returns the value of attribute param. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 + def param; end + + # Returns the value of attribute path. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 + def path; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1177 + def plural; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1193 + def resource_scope; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1217 + def shallow?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1199 + def shallow_scope; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1221 + def singleton?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1181 + def singular; end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#1224 +class ActionDispatch::Routing::Mapper::Resources::SingletonResource < ::ActionDispatch::Routing::Mapper::Resources::Resource + # @return [SingletonResource] a new instance of SingletonResource + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1225 + def initialize(entities, api_only, shallow, options); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1244 + def collection_name; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1232 + def default_actions; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1244 + def member_name; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 + def member_scope; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1130 + def nested_scope; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1240 + def plural; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1254 + def singleton?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1244 + def singular; end +end + +# CANONICAL_ACTIONS holds all actions that does not need a prefix or +# a path appended since they fit properly in their scope level. +# +# source://actionpack//lib/action_dispatch/routing/mapper.rb#1125 +ActionDispatch::Routing::Mapper::Resources::VALID_ON_OPTIONS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2190 +class ActionDispatch::Routing::Mapper::Scope + include ::Enumerable + + # @return [Scope] a new instance of Scope + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2200 + def initialize(hash, parent = T.unsafe(nil), scope_level = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2259 + def [](key); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2226 + def action_name(name_prefix, prefix, collection_name, member_name); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2266 + def each; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2274 + def frame; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2206 + def nested?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2251 + def new(hash); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2255 + def new_level(level); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2210 + def null?; end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2247 + def options; end + + # Returns the value of attribute parent. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2198 + def parent; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2222 + def resource_method_scope?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2243 + def resource_scope?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2218 + def resources?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2214 + def root?; end + + # Returns the value of attribute scope_level. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#2198 + def scope_level; end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2276 +ActionDispatch::Routing::Mapper::Scope::NULL = T.let(T.unsafe(nil), ActionDispatch::Routing::Mapper::Scope) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2191 +ActionDispatch::Routing::Mapper::Scope::OPTIONS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2196 +ActionDispatch::Routing::Mapper::Scope::RESOURCE_METHOD_SCOPES = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#2195 +ActionDispatch::Routing::Mapper::Scope::RESOURCE_SCOPES = T.let(T.unsafe(nil), Array) + +# You may wish to organize groups of controllers under a namespace. +# Most commonly, you might group a number of administrative controllers +# under an +admin+ namespace. You would place these controllers under +# the app/controllers/admin directory, and you can group them +# together in your router: +# +# namespace "admin" do +# resources :posts, :comments +# end +# +# This will create a number of routes for each of the posts and comments +# controller. For Admin::PostsController, Rails will create: +# +# GET /admin/posts +# GET /admin/posts/new +# POST /admin/posts +# GET /admin/posts/1 +# GET /admin/posts/1/edit +# PATCH/PUT /admin/posts/1 +# DELETE /admin/posts/1 +# +# If you want to route /posts (without the prefix /admin) to +# Admin::PostsController, you could use +# +# scope module: "admin" do +# resources :posts +# end +# +# or, for a single case +# +# resources :posts, module: "admin" +# +# If you want to route /admin/posts to +PostsController+ +# (without the Admin:: module prefix), you could use +# +# scope "/admin" do +# resources :posts +# end +# +# or, for a single case +# +# resources :posts, path: "/admin/posts" +# +# In each of these cases, the named routes remain the same as if you did +# not use scope. In the last case, the following paths map to +# +PostsController+: +# +# GET /admin/posts +# GET /admin/posts/new +# POST /admin/posts +# GET /admin/posts/1 +# GET /admin/posts/1/edit +# PATCH/PUT /admin/posts/1 +# DELETE /admin/posts/1 +# +# source://actionpack//lib/action_dispatch/routing/mapper.rb#794 +module ActionDispatch::Routing::Mapper::Scoping + # === Parameter Restriction + # Allows you to constrain the nested routes based on a set of rules. + # For instance, in order to change the routes to allow for a dot character in the +id+ parameter: + # + # constraints(id: /\d+\.\d+/) do + # resources :posts + # end + # + # Now routes such as +/posts/1+ will no longer be valid, but +/posts/1.1+ will be. + # The +id+ parameter must match the constraint passed in for this example. + # + # You may use this to also restrict other parameters: + # + # resources :posts do + # constraints(post_id: /\d+\.\d+/) do + # resources :comments + # end + # end + # + # === Restricting based on IP + # + # Routes can also be constrained to an IP or a certain range of IP addresses: + # + # constraints(ip: /192\.168\.\d+\.\d+/) do + # resources :posts + # end + # + # Any user connecting from the 192.168.* range will be able to see this resource, + # where as any user connecting outside of this range will be told there is no such route. + # + # === Dynamic request matching + # + # Requests to routes can be constrained based on specific criteria: + # + # constraints(-> (req) { /iPhone/.match?(req.env["HTTP_USER_AGENT"]) }) do + # resources :iphones + # end + # + # You are able to move this logic out into a class if it is too complex for routes. + # This class must have a +matches?+ method defined on it which either returns +true+ + # if the user should be given access to that route, or +false+ if the user should not. + # + # class Iphone + # def self.matches?(request) + # /iPhone/.match?(request.env["HTTP_USER_AGENT"]) + # end + # end + # + # An expected place for this code would be +lib/constraints+. + # + # This class is then used like this: + # + # constraints(Iphone) do + # resources :iphones + # end + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#999 + def constraints(constraints = T.unsafe(nil), &block); end + + # Scopes routes to a specific controller + # + # controller "food" do + # match "bacon", action: :bacon, via: :get + # end + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#884 + def controller(controller); end + + # Allows you to set default parameters for a route, such as this: + # defaults id: 'home' do + # match 'scoped_pages/(:id)', to: 'pages#show' + # end + # Using this, the +:id+ parameter here will default to 'home'. + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1008 + def defaults(defaults = T.unsafe(nil)); end + + # Scopes routes to a specific namespace. For example: + # + # namespace :admin do + # resources :posts + # end + # + # This generates the following routes: + # + # admin_posts GET /admin/posts(.:format) admin/posts#index + # admin_posts POST /admin/posts(.:format) admin/posts#create + # new_admin_post GET /admin/posts/new(.:format) admin/posts#new + # edit_admin_post GET /admin/posts/:id/edit(.:format) admin/posts#edit + # admin_post GET /admin/posts/:id(.:format) admin/posts#show + # admin_post PATCH/PUT /admin/posts/:id(.:format) admin/posts#update + # admin_post DELETE /admin/posts/:id(.:format) admin/posts#destroy + # + # === Options + # + # The +:path+, +:as+, +:module+, +:shallow_path+, and +:shallow_prefix+ + # options all default to the name of the namespace. + # + # For options, see Base#match. For +:shallow_path+ option, see + # Resources#resources. + # + # # accessible through /sekret/posts rather than /admin/posts + # namespace :admin, path: "sekret" do + # resources :posts + # end + # + # # maps to Sekret::PostsController rather than Admin::PostsController + # namespace :admin, module: "sekret" do + # resources :posts + # end + # + # # generates +sekret_posts_path+ rather than +admin_posts_path+ + # namespace :admin, as: "sekret" do + # resources :posts + # end + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#929 + def namespace(path, options = T.unsafe(nil), &block); end + + # Scopes a set of routes to the given default options. + # + # Take the following route definition as an example: + # + # scope path: ":account_id", as: "account" do + # resources :projects + # end + # + # This generates helpers such as +account_projects_path+, just like +resources+ does. + # The difference here being that the routes generated are like /:account_id/projects, + # rather than /accounts/:account_id/projects. + # + # === Options + # + # Takes same options as Base#match and Resources#resources. + # + # # route /posts (without the prefix /admin) to Admin::PostsController + # scope module: "admin" do + # resources :posts + # end + # + # # prefix the posts resource's requests with '/admin' + # scope path: "/admin" do + # resources :posts + # end + # + # # prefix the routing helper name: +sekret_posts_path+ instead of +posts_path+ + # scope as: "sekret" do + # resources :posts + # end + # + # source://actionpack//lib/action_dispatch/routing/mapper.rb#825 + def scope(*args); end + + private + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1040 + def merge_action_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1024 + def merge_as_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1064 + def merge_blocks_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1056 + def merge_constraints_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1036 + def merge_controller_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1060 + def merge_defaults_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1048 + def merge_format_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1032 + def merge_module_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1070 + def merge_options_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1052 + def merge_path_names_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1016 + def merge_path_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1020 + def merge_shallow_path_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1028 + def merge_shallow_prefix_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1074 + def merge_shallow_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1078 + def merge_to_scope(parent, child); end + + # source://actionpack//lib/action_dispatch/routing/mapper.rb#1044 + def merge_via_scope(parent, child); end +end + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#877 +ActionDispatch::Routing::Mapper::Scoping::POISON = T.let(T.unsafe(nil), Object) + +# source://actionpack//lib/action_dispatch/routing/mapper.rb#13 +ActionDispatch::Routing::Mapper::URL_OPTIONS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/routing/redirection.rb#103 +class ActionDispatch::Routing::OptionRedirect < ::ActionDispatch::Routing::Redirect + # source://actionpack//lib/action_dispatch/routing/redirection.rb#132 + def inspect; end + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#11 + def options; end + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#106 + def path(params, request); end +end + +# source://actionpack//lib/action_dispatch/routing/redirection.rb#78 +class ActionDispatch::Routing::PathRedirect < ::ActionDispatch::Routing::Redirect + # source://actionpack//lib/action_dispatch/routing/redirection.rb#93 + def inspect; end + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#81 + def path(params, request); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/redirection.rb#98 + def interpolation_required?(string, params); end +end + +# source://actionpack//lib/action_dispatch/routing/redirection.rb#79 +ActionDispatch::Routing::PathRedirect::URL_PARTS = T.let(T.unsafe(nil), Regexp) + +# Polymorphic URL helpers are methods for smart resolution to a named route call when +# given an Active Record model instance. They are to be used in combination with +# ActionController::Resources. +# +# These methods are useful when you want to generate the correct URL or path to a RESTful +# resource without having to know the exact type of the record in question. +# +# Nested resources and/or namespaces are also supported, as illustrated in the example: +# +# polymorphic_url([:admin, @article, @comment]) +# +# results in: +# +# admin_article_comment_url(@article, @comment) +# +# == Usage within the framework +# +# Polymorphic URL helpers are used in a number of places throughout the \Rails framework: +# +# * url_for, so you can use it with a record as the argument, e.g. +# url_for(@article); +# * ActionView::Helpers::FormHelper uses polymorphic_path, so you can write +# form_for(@article) without having to specify :url parameter for the form +# action; +# * redirect_to (which, in fact, uses url_for) so you can write +# redirect_to(post) in your controllers; +# * ActionView::Helpers::AtomFeedHelper, so you don't have to explicitly specify URLs +# for feed entries. +# +# == Prefixed polymorphic helpers +# +# In addition to polymorphic_url and polymorphic_path methods, a +# number of prefixed helpers are available as a shorthand to action: "..." +# in options. Those are: +# +# * edit_polymorphic_url, edit_polymorphic_path +# * new_polymorphic_url, new_polymorphic_path +# +# Example usage: +# +# edit_polymorphic_path(@post) # => "/posts/1/edit" +# polymorphic_path(@post, format: :pdf) # => "/posts/1.pdf" +# +# == Usage with mounted engines +# +# If you are using a mounted engine and you need to use a polymorphic_url +# pointing at the engine's routes, pass in the engine's route proxy as the first +# argument to the method. For example: +# +# polymorphic_url([blog, @post]) # calls blog.post_path(@post) +# form_for([blog, @post]) # => "/blog/posts/1" +# +# source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#57 +module ActionDispatch::Routing::PolymorphicRoutes + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#153 + def edit_polymorphic_path(record_or_hash, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#149 + def edit_polymorphic_url(record_or_hash, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#153 + def new_polymorphic_path(record_or_hash, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#149 + def new_polymorphic_url(record_or_hash, options = T.unsafe(nil)); end + + # Returns the path component of a URL for the given record. + # + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#124 + def polymorphic_path(record_or_hash_or_array, options = T.unsafe(nil)); end + + # Constructs a call to a named RESTful route for the given record and returns the + # resulting URL string. For example: + # + # # calls post_url(post) + # polymorphic_url(post) # => "http://example.com/posts/1" + # polymorphic_url([blog, post]) # => "http://example.com/blogs/1/posts/1" + # polymorphic_url([:admin, blog, post]) # => "http://example.com/admin/blogs/1/posts/1" + # polymorphic_url([user, :blog, post]) # => "http://example.com/users/1/blog/posts/1" + # polymorphic_url(Comment) # => "http://example.com/comments" + # + # ==== Options + # + # * :action - Specifies the action prefix for the named route: + # :new or :edit. Default is no prefix. + # * :routing_type - Allowed values are :path or :url. + # Default is :url. + # + # Also includes all the options from url_for. These include such + # things as :anchor or :trailing_slash. Example usage + # is given below: + # + # polymorphic_url([blog, post], anchor: 'my_anchor') + # # => "http://example.com/blogs/1/posts/1#my_anchor" + # polymorphic_url([blog, post], anchor: 'my_anchor', script_name: "/my_app") + # # => "http://example.com/my_app/blogs/1/posts/1#my_anchor" + # + # For all of these options, see the documentation for {url_for}[rdoc-ref:ActionDispatch::Routing::UrlFor]. + # + # ==== Functionality + # + # # an Article record + # polymorphic_url(record) # same as article_url(record) + # + # # a Comment record + # polymorphic_url(record) # same as comment_url(record) + # + # # it recognizes new records and maps to the collection + # record = Comment.new + # polymorphic_url(record) # same as comments_url() + # + # # the class of a record will also map to the collection + # polymorphic_url(Comment) # same as comments_url() + # + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#101 + def polymorphic_url(record_or_hash_or_array, options = T.unsafe(nil)); end + + private + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#168 + def polymorphic_mapping(record); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#164 + def polymorphic_path_for_action(action, record_or_hash, options); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#160 + def polymorphic_url_for_action(action, record_or_hash, options); end +end + +# source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#176 +class ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder + # @return [HelperMethodBuilder] a new instance of HelperMethodBuilder + # + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#239 + def initialize(key_strategy, prefix, suffix); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#253 + def handle_class(klass); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#257 + def handle_class_call(target, klass); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#284 + def handle_list(list); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#261 + def handle_model(record); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#275 + def handle_model_call(target, record); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#245 + def handle_string(record); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#249 + def handle_string_call(target, str); end + + # Returns the value of attribute prefix. + # + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#237 + def prefix; end + + # Returns the value of attribute suffix. + # + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#237 + def suffix; end + + private + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#338 + def get_method_for_class(klass); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#343 + def get_method_for_string(str); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#330 + def polymorphic_mapping(target, record); end + + class << self + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#187 + def build(action, type); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#179 + def get(action, type); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#185 + def path; end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#201 + def plural(prefix, suffix); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#205 + def polymorphic_method(recipient, record_or_hash_or_array, action, type, options); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#197 + def singular(prefix, suffix); end + + # source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#184 + def url; end + end +end + +# source://actionpack//lib/action_dispatch/routing/polymorphic_routes.rb#177 +ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder::CACHE = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/routing/redirection.rb#10 +class ActionDispatch::Routing::Redirect < ::ActionDispatch::Routing::Endpoint + # @return [Redirect] a new instance of Redirect + # + # source://actionpack//lib/action_dispatch/routing/redirection.rb#13 + def initialize(status, block); end + + # Returns the value of attribute block. + # + # source://actionpack//lib/action_dispatch/routing/redirection.rb#11 + def block; end + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#20 + def call(env); end + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#56 + def inspect; end + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#52 + def path(params, request); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/redirection.rb#18 + def redirect?; end + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#24 + def serve(req); end + + # Returns the value of attribute status. + # + # source://actionpack//lib/action_dispatch/routing/redirection.rb#11 + def status; end + + private + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#65 + def escape(params); end + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#69 + def escape_fragment(params); end + + # source://actionpack//lib/action_dispatch/routing/redirection.rb#73 + def escape_path(params); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/redirection.rb#61 + def relative_path?(path); end +end + +# source://actionpack//lib/action_dispatch/routing/redirection.rb#137 +module ActionDispatch::Routing::Redirection + # Redirect any path to another path: + # + # get "/stories" => redirect("/posts") + # + # This will redirect the user, while ignoring certain parts of the request, including query string, etc. + # /stories, /stories?foo=bar, etc all redirect to /posts. + # + # The redirect will use a 301 Moved Permanently status code by + # default. This can be overridden with the +:status+ option: + # + # get "/stories" => redirect("/posts", status: 307) + # + # You can also use interpolation in the supplied redirect argument: + # + # get 'docs/:article', to: redirect('/wiki/%{article}') + # + # Note that if you return a path without a leading slash then the URL is prefixed with the + # current SCRIPT_NAME environment variable. This is typically '/' but may be different in + # a mounted engine or where the application is deployed to a subdirectory of a website. + # + # Alternatively you can use one of the other syntaxes: + # + # The block version of redirect allows for the easy encapsulation of any logic associated with + # the redirect in question. Either the params and request are supplied as arguments, or just + # params, depending of how many arguments your block accepts. A string is required as a + # return value. + # + # get 'jokes/:number', to: redirect { |params, request| + # path = (params[:number].to_i.even? ? "wheres-the-beef" : "i-love-lamp") + # "http://#{request.host_with_port}/#{path}" + # } + # + # Note that the do end syntax for the redirect block wouldn't work, as Ruby would pass + # the block to +get+ instead of +redirect+. Use { ... } instead. + # + # The options version of redirect allows you to supply only the parts of the URL which need + # to change, it also supports interpolation of the path similar to the first example. + # + # get 'stores/:name', to: redirect(subdomain: 'stores', path: '/%{name}') + # get 'stores/:name(*all)', to: redirect(subdomain: 'stores', path: '/%{name}%{all}') + # get '/stories', to: redirect(path: '/posts') + # + # This will redirect the user, while changing only the specified parts of the request, + # for example the +path+ option in the last example. + # /stories, /stories?foo=bar, redirect to /posts and /posts?foo=bar respectively. + # + # Finally, an object which responds to call can be supplied to redirect, allowing you to reuse + # common redirect routes. The call method must accept two arguments, params and request, and return + # a string. + # + # get 'accounts/:name' => redirect(SubdomainRedirector.new('api')) + # + # @raise [ArgumentError] + # + # source://actionpack//lib/action_dispatch/routing/redirection.rb#190 + def redirect(*args, &block); end +end + +# :stopdoc: +# +# source://actionpack//lib/action_dispatch/routing/route_set.rb#14 +class ActionDispatch::Routing::RouteSet + # @return [RouteSet] a new instance of RouteSet + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#366 + def initialize(config = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#615 + def add_polymorphic_mapping(klass, options, &block); end + + # @raise [ArgumentError] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#584 + def add_route(mapping, name); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#619 + def add_url_helper(name, options, &block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#395 + def api_only?; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#415 + def append(&block); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#849 + def call(env); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#439 + def clear!; end + + # Returns the value of attribute default_scope. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 + def default_scope; end + + # Sets the attribute default_scope + # + # @param value the value to set the attribute default_scope to. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 + def default_scope=(_arg0); end + + # Returns the value of attribute default_url_options. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#338 + def default_url_options; end + + # Sets the attribute default_url_options + # + # @param value the value to set the attribute default_url_options to. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#338 + def default_url_options=(_arg0); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#461 + def define_mounted_helper(name, script_namer = T.unsafe(nil)); end + + # Returns the value of attribute disable_clear_and_finalize. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#337 + def disable_clear_and_finalize; end + + # Sets the attribute disable_clear_and_finalize + # + # @param value the value to set the attribute disable_clear_and_finalize to. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#337 + def disable_clear_and_finalize=(_arg0); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#408 + def draw(&block); end + + # Returns the value of attribute draw_paths. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#338 + def draw_paths; end + + # Sets the attribute draw_paths + # + # @param value the value to set the attribute draw_paths to. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#338 + def draw_paths=(_arg0); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#385 + def eager_load!; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#580 + def empty?; end + + # Returns the value of attribute env_key. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#339 + def env_key; end + + # Generate the path indicated by the arguments, and return an array of + # the keys that were not used to generate it. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#760 + def extra_keys(options, recall = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#433 + def finalize!; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#792 + def find_relative_url_root(options); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#788 + def find_script_name(options); end + + # Returns the value of attribute formatter. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 + def formatter; end + + # Sets the attribute formatter + # + # @param value the value to set the attribute formatter to. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 + def formatter=(_arg0); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#764 + def generate_extras(options, recall = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#488 + def generate_url_helpers(supports_path); end + + # Since the router holds references to many parts of the system + # like engines, controllers and the application itself, inspecting + # the route set can actually be really slow, therefore we default + # alias inspect to to_s. + def inspect; end + + # Contains all the mounted helpers across different + # engines and the `main_app` helper for the application. + # You can include this in your classes if you want to + # access routes for other engines. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#457 + def mounted_helpers; end + + # Returns the value of attribute named_routes. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 + def named_routes; end + + # Sets the attribute named_routes + # + # @param value the value to set the attribute named_routes to. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 + def named_routes=(_arg0); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#784 + def optimize_routes_generation?; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#796 + def path_for(options, route_name = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Returns the value of attribute polymorphic_mappings. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#339 + def polymorphic_mappings; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#419 + def prepend(&block); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#855 + def recognize_path(path, environment = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#870 + def recognize_path_with_request(req, path, extras, raise_on_missing: T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#391 + def relative_url_root; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#399 + def request_class; end + + # Returns the value of attribute resources_path_names. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#337 + def resources_path_names; end + + # Sets the attribute resources_path_names + # + # @param value the value to set the attribute resources_path_names to. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#337 + def resources_path_names=(_arg0); end + + # Returns the value of attribute router. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 + def router; end + + # Sets the attribute router + # + # @param value the value to set the attribute router to. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 + def router=(_arg0); end + + # Returns the value of attribute set. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 + def routes; end + + # Returns the value of attribute set. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 + def set; end + + # Sets the attribute set + # + # @param value the value to set the attribute set to. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#336 + def set=(_arg0); end + + # The +options+ argument must be a hash whose keys are *symbols*. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#801 + def url_for(options, route_name = T.unsafe(nil), url_strategy = T.unsafe(nil), method_name = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#480 + def url_helpers(supports_path = T.unsafe(nil)); end + + private + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#423 + def eval_block(block); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#775 + def generate(route_name, options, recall = T.unsafe(nil), method_name = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#403 + def make_request(env); end + + class << self + # source://actionpack//lib/action_dispatch/routing/route_set.rb#343 + def default_resources_path_names; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#347 + def new_with_config(config); end + end +end + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#362 +class ActionDispatch::Routing::RouteSet::Config < ::Struct + # Returns the value of attribute api_only + # + # @return [Object] the current value of api_only + def api_only; end + + # Sets the attribute api_only + # + # @param value [Object] the value to set the attribute api_only to. + # @return [Object] the newly set value + def api_only=(_); end + + # Returns the value of attribute relative_url_root + # + # @return [Object] the current value of relative_url_root + def relative_url_root; end + + # Sets the attribute relative_url_root + # + # @param value [Object] the value to set the attribute relative_url_root to. + # @return [Object] the newly set value + def relative_url_root=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#623 +class ActionDispatch::Routing::RouteSet::CustomUrlHelper + # @return [CustomUrlHelper] a new instance of CustomUrlHelper + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#626 + def initialize(name, defaults, &block); end + + # Returns the value of attribute block. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#624 + def block; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#632 + def call(t, args, only_path = T.unsafe(nil)); end + + # Returns the value of attribute defaults. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#624 + def defaults; end + + # Returns the value of attribute name. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#624 + def name; end + + private + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#644 + def eval_block(t, args, options); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#648 + def merge_defaults(options); end +end + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#364 +ActionDispatch::Routing::RouteSet::DEFAULT_CONFIG = T.let(T.unsafe(nil), ActionDispatch::Routing::RouteSet::Config) + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#21 +class ActionDispatch::Routing::RouteSet::Dispatcher < ::ActionDispatch::Routing::Endpoint + # @return [Dispatcher] a new instance of Dispatcher + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#22 + def initialize(raise_on_name_error); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#26 + def dispatcher?; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#28 + def serve(req); end + + private + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#42 + def controller(req); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#48 + def dispatch(controller, action, req, res); end +end + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#653 +class ActionDispatch::Routing::RouteSet::Generator + # @return [Generator] a new instance of Generator + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#656 + def initialize(named_route, options, recall, set); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#668 + def controller; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#672 + def current_controller; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#743 + def different_controller?; end + + # Generates a path from routes, returns a RouteWithParams or MissingRoute. + # MissingRoute will raise ActionController::UrlGenerationError. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#739 + def generate; end + + # Returns the value of attribute named_route. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#654 + def named_route; end + + # Remove leading slashes from controllers + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#727 + def normalize_controller!; end + + # This pulls :controller, :action, and :id out of the recall. + # The recall key is only used if there is no key in the options + # or if the key in the options is identical. If any of + # :controller, :action or :id is not found, don't pull any + # more keys from the recall. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#709 + def normalize_controller_action_id!; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#684 + def normalize_options!; end + + # Returns the value of attribute options. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#654 + def options; end + + # Returns the value of attribute recall. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#654 + def recall; end + + # Returns the value of attribute set. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#654 + def set; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#676 + def use_recall_for(key); end + + # if the current controller is "foo/bar/baz" and controller: "baz/bat" + # is specified, the controller becomes "foo/baz/bat" + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#717 + def use_relative_controller!; end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#749 + def named_route_exists?; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#753 + def segment_keys; end +end + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#448 +module ActionDispatch::Routing::RouteSet::MountedHelpers + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActionDispatch::Routing::UrlFor + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end + + module GeneratedInstanceMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end +end + +# A NamedRouteCollection instance is a collection of named routes, and also +# maintains an anonymous module that can be used to install helpers for the +# named routes. +# +# source://actionpack//lib/action_dispatch/routing/route_set.rb#66 +class ActionDispatch::Routing::RouteSet::NamedRouteCollection + include ::Enumerable + + # @return [NamedRouteCollection] a new instance of NamedRouteCollection + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#71 + def initialize; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#121 + def [](name); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#102 + def []=(name, route); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#102 + def add(name, route); end + + # Given a +name+, defines name_path and name_url helpers. + # Used by 'direct', 'resolve', and 'polymorphic' route helpers. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#149 + def add_url_helper(name, defaults, &block); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#88 + def clear; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#88 + def clear!; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#134 + def each(&block); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#121 + def get(name); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#84 + def helper_names; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#125 + def key?(name); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#143 + def length; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#139 + def names; end + + # Returns the value of attribute path_helpers_module. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#68 + def path_helpers_module; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#79 + def route_defined?(name); end + + # Returns the value of attribute url_helpers_module. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#68 + def url_helpers_module; end + + private + + # Create a URL helper allowing ordered parameters to be associated + # with corresponding dynamic segments, so you can do: + # + # foo_url(bar, baz, bang) + # + # Instead of: + # + # foo_url(bar: bar, baz: baz, bang: bang) + # + # Also allow options hash, so you can do: + # + # foo_url(bar, baz, bang, sort_by: 'baz') + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#317 + def define_url_helper(mod, name, helper, url_strategy); end + + # Returns the value of attribute routes. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#68 + def routes; end +end + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#172 +class ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper + # @return [UrlHelper] a new instance of UrlHelper + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#255 + def initialize(route, options, route_name); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#262 + def call(t, method_name, args, inner_options, url_strategy); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#274 + def handle_positional_args(controller_options, inner_options, args, result, path_params); end + + # Returns the value of attribute route_name. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#185 + def route_name; end + + class << self + # source://actionpack//lib/action_dispatch/routing/route_set.rb#173 + def create(route, options, route_name); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#181 + def optimize_helper?(route); end + end +end + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#187 +class ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper::OptimizedUrlHelper < ::ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper + # @return [OptimizedUrlHelper] a new instance of OptimizedUrlHelper + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#190 + def initialize(route, options, route_name); end + + # Returns the value of attribute arg_size. + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#188 + def arg_size; end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#196 + def call(t, method_name, args, inner_options, url_strategy); end + + private + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#227 + def optimize_routes_generation?(t); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#219 + def optimized_helper(args); end + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#231 + def parameterize_args(args); end + + # @raise [ActionController::UrlGenerationError] + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#242 + def raise_generation_error(args); end +end + +# strategy for building URLs to send to the client +# +# source://actionpack//lib/action_dispatch/routing/route_set.rb#333 +ActionDispatch::Routing::RouteSet::PATH = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#780 +ActionDispatch::Routing::RouteSet::RESERVED_OPTIONS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#53 +class ActionDispatch::Routing::RouteSet::StaticDispatcher < ::ActionDispatch::Routing::RouteSet::Dispatcher + # @return [StaticDispatcher] a new instance of StaticDispatcher + # + # source://actionpack//lib/action_dispatch/routing/route_set.rb#54 + def initialize(controller_class); end + + private + + # source://actionpack//lib/action_dispatch/routing/route_set.rb#60 + def controller(_); end +end + +# source://actionpack//lib/action_dispatch/routing/route_set.rb#334 +ActionDispatch::Routing::RouteSet::UNKNOWN = T.let(T.unsafe(nil), Proc) + +# source://actionpack//lib/action_dispatch/routing/inspector.rb#8 +class ActionDispatch::Routing::RouteWrapper < ::SimpleDelegator + # source://actionpack//lib/action_dispatch/routing/inspector.rb#41 + def action; end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#13 + def constraints; end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#37 + def controller; end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#9 + def endpoint; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/inspector.rb#49 + def engine?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/inspector.rb#45 + def internal?; end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#25 + def name; end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#21 + def path; end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#17 + def rack_app; end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#29 + def reqs; end +end + +# This class is just used for displaying route information when someone +# executes `bin/rails routes` or looks at the RoutingError page. +# People should not use this class. +# +# source://actionpack//lib/action_dispatch/routing/inspector.rb#58 +class ActionDispatch::Routing::RoutesInspector + # @return [RoutesInspector] a new instance of RoutesInspector + # + # source://actionpack//lib/action_dispatch/routing/inspector.rb#59 + def initialize(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#64 + def format(formatter, filter = T.unsafe(nil)); end + + private + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#117 + def collect_engine_routes(route); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#104 + def collect_routes(routes); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#93 + def filter_routes(filter); end + + # source://actionpack//lib/action_dispatch/routing/inspector.rb#84 + def normalize_filter(filter); end +end + +# source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#7 +class ActionDispatch::Routing::RoutesProxy + include ::ActionDispatch::Routing::PolymorphicRoutes + include ::ActionDispatch::Routing::UrlFor + + # @return [RoutesProxy] a new instance of RoutesProxy + # + # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#13 + def initialize(routes, scope, helpers, script_namer = T.unsafe(nil)); end + + # Returns the value of attribute routes. + # + # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#10 + def _routes; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options=(_arg0); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options?; end + + # Returns the value of attribute routes. + # + # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#10 + def routes; end + + # Sets the attribute routes + # + # @param value the value to set the attribute routes to. + # + # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#10 + def routes=(_arg0); end + + # Returns the value of attribute scope. + # + # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#10 + def scope; end + + # Sets the attribute scope + # + # @param value the value to set the attribute scope to. + # + # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#10 + def scope=(_arg0); end + + # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#19 + def url_options; end + + private + + # Keeps the part of the script name provided by the global + # context via ENV["SCRIPT_NAME"], which `mount` doesn't know + # about since it depends on the specific request, but use our + # script name resolver for the mount point dependent part. + # + # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#58 + def merge_script_names(previous_script_name, new_script_name); end + + # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#30 + def method_missing(method, *args); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/routes_proxy.rb#26 + def respond_to_missing?(method, _); end + + class << self + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options=(value); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#95 + def default_url_options?; end + end +end + +# source://actionpack//lib/action_dispatch/routing.rb#257 +ActionDispatch::Routing::SEPARATORS = T.let(T.unsafe(nil), Array) + +# In config/routes.rb you define URL-to-controller mappings, but the reverse +# is also possible: a URL can be generated from one of your routing definitions. +# URL generation functionality is centralized in this module. +# +# See ActionDispatch::Routing for general information about routing and routes.rb. +# +# Tip: If you need to generate URLs from your models or some other place, +# then ActionController::UrlFor is what you're looking for. Read on for +# an introduction. In general, this module should not be included on its own, +# as it is usually included by url_helpers (as in Rails.application.routes.url_helpers). +# +# == URL generation from parameters +# +# As you may know, some functions, such as ActionController::Base#url_for +# and ActionView::Helpers::UrlHelper#link_to, can generate URLs given a set +# of parameters. For example, you've probably had the chance to write code +# like this in one of your views: +# +# <%= link_to('Click here', controller: 'users', +# action: 'new', message: 'Welcome!') %> +# # => Click here +# +# link_to, and all other functions that require URL generation functionality, +# actually use ActionController::UrlFor under the hood. And in particular, +# they use the ActionController::UrlFor#url_for method. One can generate +# the same path as the above example by using the following code: +# +# include UrlFor +# url_for(controller: 'users', +# action: 'new', +# message: 'Welcome!', +# only_path: true) +# # => "/users/new?message=Welcome%21" +# +# Notice the only_path: true part. This is because UrlFor has no +# information about the website hostname that your Rails app is serving. So if you +# want to include the hostname as well, then you must also pass the :host +# argument: +# +# include UrlFor +# url_for(controller: 'users', +# action: 'new', +# message: 'Welcome!', +# host: 'www.example.com') +# # => "http://www.example.com/users/new?message=Welcome%21" +# +# By default, all controllers and views have access to a special version of url_for, +# that already knows what the current hostname is. So if you use url_for in your +# controllers or your views, then you don't need to explicitly pass the :host +# argument. +# +# For convenience reasons, mailers provide a shortcut for ActionController::UrlFor#url_for. +# So within mailers, you only have to type +url_for+ instead of 'ActionController::UrlFor#url_for' +# in full. However, mailers don't have hostname information, and you still have to provide +# the +:host+ argument or set the default host that will be used in all mailers using the +# configuration option +config.action_mailer.default_url_options+. For more information on +# url_for in mailers read the ActionMailer#Base documentation. +# +# +# == URL generation for named routes +# +# UrlFor also allows one to access methods that have been auto-generated from +# named routes. For example, suppose that you have a 'users' resource in your +# config/routes.rb: +# +# resources :users +# +# This generates, among other things, the method users_path. By default, +# this method is accessible from your controllers, views, and mailers. If you need +# to access this auto-generated method from other places (such as a model), then +# you can do that by including Rails.application.routes.url_helpers in your class: +# +# class User < ActiveRecord::Base +# include Rails.application.routes.url_helpers +# +# def base_uri +# user_path(self) +# end +# end +# +# User.find(1).base_uri # => "/users/1" +# +# source://actionpack//lib/action_dispatch/routing/url_for.rb#87 +module ActionDispatch::Routing::UrlFor + include ::ActionDispatch::Routing::PolymorphicRoutes + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#106 + def initialize(*_arg0, **_arg1, &_arg2); end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#173 + def full_url_for(options = T.unsafe(nil)); end + + # Allows calling direct or regular named route. + # + # resources :buckets + # + # direct :recordable do |recording| + # route_for(:bucket, recording.bucket) + # end + # + # direct :threadable do |threadable| + # route_for(:recordable, threadable.parent) + # end + # + # This maintains the context of the original caller on + # whether to return a path or full URL, e.g: + # + # threadable_path(threadable) # => "/buckets/1" + # threadable_url(threadable) # => "http://example.com/buckets/1" + # + # source://actionpack//lib/action_dispatch/routing/url_for.rb#213 + def route_for(name, *args); end + + # Generate a URL based on the options provided, default_url_options, and the + # routes defined in routes.rb. The following options are supported: + # + # * :only_path - If true, the relative URL is returned. Defaults to +false+. + # * :protocol - The protocol to connect to. Defaults to 'http'. + # * :host - Specifies the host the link should be targeted at. + # If :only_path is false, this option must be + # provided either explicitly, or via +default_url_options+. + # * :subdomain - Specifies the subdomain of the link, using the +tld_length+ + # to split the subdomain from the host. + # If false, removes all subdomains from the host part of the link. + # * :domain - Specifies the domain of the link, using the +tld_length+ + # to split the domain from the host. + # * :tld_length - Number of labels the TLD id composed of, only used if + # :subdomain or :domain are supplied. Defaults to + # ActionDispatch::Http::URL.tld_length, which in turn defaults to 1. + # * :port - Optionally specify the port to connect to. + # * :anchor - An anchor name to be appended to the path. + # * :params - The query parameters to be appended to the path. + # * :trailing_slash - If true, adds a trailing slash, as in "/archive/2009/" + # * :script_name - Specifies application path relative to domain root. If provided, prepends application path. + # + # Any other key (:controller, :action, etc.) given to + # +url_for+ is forwarded to the Routes module. + # + # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', port: '8080' + # # => 'http://somehost.org:8080/tasks/testing' + # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', anchor: 'ok', only_path: true + # # => '/tasks/testing#ok' + # url_for controller: 'tasks', action: 'testing', trailing_slash: true + # # => 'http://somehost.org/tasks/testing/' + # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', number: '33' + # # => 'http://somehost.org/tasks/testing?number=33' + # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', script_name: "/myapp" + # # => 'http://somehost.org/myapp/tasks/testing' + # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', script_name: "/myapp", only_path: true + # # => '/myapp/tasks/testing' + # + # Missing routes keys may be filled in from the current request's parameters + # (e.g. +:controller+, +:action+, +:id+, and any other parameters that are + # placed in the path). Given that the current action has been reached + # through GET /users/1: + # + # url_for(only_path: true) # => '/users/1' + # url_for(only_path: true, action: 'edit') # => '/users/1/edit' + # url_for(only_path: true, action: 'edit', id: 2) # => '/users/2/edit' + # + # Notice that no +:id+ parameter was provided to the first +url_for+ call + # and the helper used the one from the route's path. Any path parameter + # implicitly used by +url_for+ can always be overwritten like shown on the + # last +url_for+ calls. + # + # source://actionpack//lib/action_dispatch/routing/url_for.rb#169 + def url_for(options = T.unsafe(nil)); end + + # Hook overridden in controller to add request information + # with +default_url_options+. Application logic should not + # go into url_options. + # + # source://actionpack//lib/action_dispatch/routing/url_for.rb#114 + def url_options; end + + protected + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/routing/url_for.rb#218 + def optimize_routes_generation?; end + + private + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#230 + def _routes_context; end + + # source://actionpack//lib/action_dispatch/routing/url_for.rb#223 + def _with_routes(routes); end + + module GeneratedClassMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end + + module GeneratedInstanceMethods + def default_url_options; end + def default_url_options=(value); end + def default_url_options?; end + end +end + +# This middleware is added to the stack when config.force_ssl = true, and is passed +# the options set in +config.ssl_options+. It does three jobs to enforce secure HTTP +# requests: +# +# 1. TLS redirect: Permanently redirects +http://+ requests to +https://+ +# with the same URL host, path, etc. Enabled by default. Set +config.ssl_options+ +# to modify the destination URL +# (e.g. redirect: { host: "secure.widgets.com", port: 8080 }), or set +# redirect: false to disable this feature. +# +# Requests can opt-out of redirection with +exclude+: +# +# config.ssl_options = { redirect: { exclude: -> request { /healthcheck/.match?(request.path) } } } +# +# Cookies will not be flagged as secure for excluded requests. +# +# 2. Secure cookies: Sets the +secure+ flag on cookies to tell browsers they +# must not be sent along with +http://+ requests. Enabled by default. Set +# +config.ssl_options+ with secure_cookies: false to disable this feature. +# +# 3. HTTP Strict Transport Security (HSTS): Tells the browser to remember +# this site as TLS-only and automatically redirect non-TLS requests. +# Enabled by default. Configure +config.ssl_options+ with hsts: false to disable. +# +# Set +config.ssl_options+ with hsts: { ... } to configure HSTS: +# +# * +expires+: How long, in seconds, these settings will stick. The minimum +# required to qualify for browser preload lists is 1 year. Defaults to +# 2 years (recommended). +# +# * +subdomains+: Set to +true+ to tell the browser to apply these settings +# to all subdomains. This protects your cookies from interception by a +# vulnerable site on a subdomain. Defaults to +true+. +# +# * +preload+: Advertise that this site may be included in browsers' +# preloaded HSTS lists. HSTS protects your site on every visit except the +# first visit since it hasn't seen your HSTS header yet. To close this +# gap, browser vendors include a baked-in list of HSTS-enabled sites. +# Go to https://hstspreload.org to submit your site for inclusion. +# Defaults to +false+. +# +# To turn off HSTS, omitting the header is not enough. Browsers will remember the +# original HSTS directive until it expires. Instead, use the header to tell browsers to +# expire HSTS immediately. Setting hsts: false is a shortcut for +# hsts: { expires: 0 }. +# +# source://actionpack//lib/action_dispatch/middleware/ssl.rb#49 +class ActionDispatch::SSL + # @return [SSL] a new instance of SSL + # + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#61 + def initialize(app, redirect: T.unsafe(nil), hsts: T.unsafe(nil), secure_cookies: T.unsafe(nil), ssl_default_redirect_status: T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#73 + def call(env); end + + private + + # https://tools.ietf.org/html/rfc6797#section-6.1 + # + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#107 + def build_hsts_header(hsts); end + + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#114 + def flag_cookies_as_secure!(headers); end + + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#145 + def https_location_for(request); end + + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#92 + def normalize_hsts_options(options); end + + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#128 + def redirect_to_https(request); end + + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#135 + def redirection_status(request); end + + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#88 + def set_hsts_header!(headers); end + + class << self + # source://actionpack//lib/action_dispatch/middleware/ssl.rb#57 + def default_hsts_options; end + end +end + +# Default to 2 years as recommended on hstspreload.org. +# +# source://actionpack//lib/action_dispatch/middleware/ssl.rb#53 +ActionDispatch::SSL::HSTS_EXPIRES_IN = T.let(T.unsafe(nil), Integer) + +# source://actionpack//lib/action_dispatch/middleware/ssl.rb#55 +ActionDispatch::SSL::PERMANENT_REDIRECT_REQUEST_METHODS = T.let(T.unsafe(nil), Array) + +# source://actionpack//lib/action_dispatch/middleware/server_timing.rb#6 +class ActionDispatch::ServerTiming + # @return [ServerTiming] a new instance of ServerTiming + # + # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#52 + def initialize(app); end + + # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#58 + def call(env); end + + class << self + # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#48 + def unsubscribe; end + end +end + +# source://actionpack//lib/action_dispatch/middleware/server_timing.rb#7 +ActionDispatch::ServerTiming::SERVER_TIMING_HEADER = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/middleware/server_timing.rb#9 +class ActionDispatch::ServerTiming::Subscriber + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # @return [Subscriber] a new instance of Subscriber + # + # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#13 + def initialize; end + + # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#17 + def call(event); end + + # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#23 + def collect_events; end + + # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#32 + def ensure_subscribed; end + + # source://actionpack//lib/action_dispatch/middleware/server_timing.rb#40 + def unsubscribe; end + + 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#91 +module ActionDispatch::Session; end + +# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#90 +class ActionDispatch::Session::AbstractSecureStore < ::Rack::Session::Abstract::PersistedSecure + include ::ActionDispatch::Session::Compatibility + include ::ActionDispatch::Session::StaleSessionCheck + include ::ActionDispatch::Session::SessionObject + + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#95 + def generate_sid; end + + private + + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#100 + def set_cookie(request, response, cookie); end +end + +# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#79 +class ActionDispatch::Session::AbstractStore < ::Rack::Session::Abstract::Persisted + include ::ActionDispatch::Session::Compatibility + include ::ActionDispatch::Session::StaleSessionCheck + include ::ActionDispatch::Session::SessionObject + + private + + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#85 + def set_cookie(request, response, cookie); end +end + +# A session store that uses an ActiveSupport::Cache::Store to store the sessions. This store is most useful +# if you don't store critical data in your sessions and you don't need them to live for extended periods +# of time. +# +# ==== Options +# * cache - The cache to use. If it is not specified, Rails.cache will be used. +# * expire_after - The length of time a session will be stored before automatically expiring. +# By default, the :expires_in option of the cache is used. +# +# source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#15 +class ActionDispatch::Session::CacheStore < ::ActionDispatch::Session::AbstractSecureStore + # @return [CacheStore] a new instance of CacheStore + # + # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#16 + def initialize(app, options = T.unsafe(nil)); end + + # Remove a session from the cache. + # + # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#42 + def delete_session(env, sid, options); end + + # Get a session from the cache. + # + # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#23 + def find_session(env, sid); end + + # Set a session in the cache. + # + # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#31 + def write_session(env, sid, session, options); end + + private + + # Turn the session id into a cache key. + # + # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#50 + def cache_key(id); end + + # source://actionpack//lib/action_dispatch/middleware/session/cache_store.rb#54 + def get_session_with_fallback(sid); end +end + +# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#20 +module ActionDispatch::Session::Compatibility + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#21 + def initialize(app, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#26 + def generate_sid; end + + private + + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#33 + def initialize_sid; end + + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#38 + def make_request(env); end +end + +# This cookie-based session store is the Rails default. It is +# dramatically faster than the alternatives. +# +# Sessions typically contain at most a user ID and flash message; both fit +# within the 4096 bytes cookie size limit. A +CookieOverflow+ exception is raised if +# you attempt to store more than 4096 bytes of data. +# +# The cookie jar used for storage is automatically configured to be the +# best possible option given your application's configuration. +# +# Your cookies will be encrypted using your application's +secret_key_base+. This +# goes a step further than signed cookies in that encrypted cookies cannot +# be altered or read by users. This is the default starting in Rails 4. +# +# Configure your session store in an initializer: +# +# Rails.application.config.session_store :cookie_store, key: '_your_app_session' +# +# In the development and test environments your application's +secret_key_base+ is +# generated by Rails and stored in a temporary file in tmp/development_secret.txt. +# In all other environments, it is stored encrypted in the +# config/credentials.yml.enc file. +# +# If your application was not updated to Rails 5.2 defaults, the +secret_key_base+ +# will be found in the old config/secrets.yml file. +# +# Note that changing your +secret_key_base+ will invalidate all existing session. +# Additionally, you should take care to make sure you are not relying on the +# ability to decode signed cookies generated by your app in external +# applications or JavaScript before changing it. +# +# Because CookieStore extends +Rack::Session::Abstract::Persisted+, many of the +# options described there can be used to customize the session cookie that +# is generated. For example: +# +# Rails.application.config.session_store :cookie_store, expire_after: 14.days +# +# would set the session cookie to expire automatically 14 days after creation. +# Other useful options include :key, :secure, +# :httponly, and :same_site. +# +# source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#49 +class ActionDispatch::Session::CookieStore < ::ActionDispatch::Session::AbstractSecureStore + # @return [CookieStore] a new instance of CookieStore + # + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#59 + def initialize(app, options = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#63 + def delete_session(req, session_id, options); end + + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#70 + def load_session(req); end + + private + + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#117 + def cookie_jar(request); end + + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#79 + def extract_session_id(req); end + + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#113 + def get_cookie(req); end + + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#98 + def persistent_session_id!(data, sid = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#109 + def set_cookie(request, session_id, cookie); end + + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#86 + def unpacked_cookie_data(req); end + + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#104 + def write_session(req, sid, session_data, options); end +end + +# source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#50 +class ActionDispatch::Session::CookieStore::SessionId + # @return [SessionId] a new instance of SessionId + # + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#53 + def initialize(session_id, cookie_value = T.unsafe(nil)); end + + # Returns the value of attribute cookie_value. + # + # source://actionpack//lib/action_dispatch/middleware/session/cookie_store.rb#51 + def cookie_value; end +end + +# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#69 +module ActionDispatch::Session::SessionObject + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#74 + def loaded_session?(session); end + + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#70 + def prepare_session(req); end +end + +# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#11 +class ActionDispatch::Session::SessionRestoreError < ::StandardError + # @return [SessionRestoreError] a new instance of SessionRestoreError + # + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#12 + def initialize; end +end + +# source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#43 +module ActionDispatch::Session::StaleSessionCheck + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#48 + def extract_session_id(env); end + + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#44 + def load_session(env); end + + # source://actionpack//lib/action_dispatch/middleware/session/abstract_store.rb#52 + def stale_session_check!; end +end + +# This middleware rescues any exception returned by the application +# and calls an exceptions app that will wrap it in a format for the end user. +# +# The exceptions app should be passed as parameter on initialization +# of ShowExceptions. Every time there is an exception, ShowExceptions will +# store the exception in env["action_dispatch.exception"], rewrite the +# PATH_INFO to the exception status code and call the Rack app. +# +# If the application returns a "X-Cascade" pass response, this middleware +# will send an empty response as result with the correct status code. +# If any exception happens inside the exceptions app, this middleware +# catches the exceptions and returns a failsafe response. +# +# source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#18 +class ActionDispatch::ShowExceptions + # @return [ShowExceptions] a new instance of ShowExceptions + # + # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#19 + def initialize(app, exceptions_app); end + + # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#24 + def call(env); end + + private + + # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#58 + def fallback_to_html_format_if_invalid_mime_type(request); end + + # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#67 + def pass_response(status); end + + # source://actionpack//lib/action_dispatch/middleware/show_exceptions.rb#36 + def render_exception(request, exception); end +end + +# This middleware serves static files from disk, if available. +# If no file is found, it hands off to the main app. +# +# In Rails apps, this middleware is configured to serve assets from +# the +public/+ directory. +# +# Only GET and HEAD requests are served. POST and other HTTP methods +# are handed off to the main app. +# +# Only files in the root directory are served; path traversal is denied. +# +# source://actionpack//lib/action_dispatch/middleware/static.rb#16 +class ActionDispatch::Static + # @return [Static] a new instance of Static + # + # source://actionpack//lib/action_dispatch/middleware/static.rb#17 + def initialize(app, path, index: T.unsafe(nil), headers: T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/middleware/static.rb#22 + def call(env); end +end + +# = System Testing +# +# System tests let you test applications in the browser. Because system +# tests use a real browser experience, you can test all of your JavaScript +# easily from your test suite. +# +# To create a system test in your application, extend your test class +# from ApplicationSystemTestCase. System tests use Capybara as a +# base and allow you to configure the settings through your +# application_system_test_case.rb file that is generated with a new +# application or scaffold. +# +# Here is an example system test: +# +# require "application_system_test_case" +# +# class Users::CreateTest < ApplicationSystemTestCase +# test "adding a new user" do +# visit users_path +# click_on 'New User' +# +# fill_in 'Name', with: 'Arya' +# click_on 'Create User' +# +# assert_text 'Arya' +# end +# end +# +# When generating an application or scaffold, an +application_system_test_case.rb+ +# file will also be generated containing the base class for system testing. +# This is where you can change the driver, add Capybara settings, and other +# configuration for your system tests. +# +# require "test_helper" +# +# class ApplicationSystemTestCase < ActionDispatch::SystemTestCase +# driven_by :selenium, using: :chrome, screen_size: [1400, 1400] +# end +# +# By default, ActionDispatch::SystemTestCase is driven by the +# Selenium driver, with the Chrome browser, and a browser size of 1400x1400. +# +# Changing the driver configuration options is easy. Let's say you want to use +# the Firefox browser instead of Chrome. In your +application_system_test_case.rb+ +# file add the following: +# +# require "test_helper" +# +# class ApplicationSystemTestCase < ActionDispatch::SystemTestCase +# driven_by :selenium, using: :firefox +# end +# +# +driven_by+ has a required argument for the driver name. The keyword +# arguments are +:using+ for the browser and +:screen_size+ to change the +# size of the browser screen. These two options are not applicable for +# headless drivers and will be silently ignored if passed. +# +# Headless browsers such as headless Chrome and headless Firefox are also supported. +# You can use these browsers by setting the +:using+ argument to +:headless_chrome+ or +:headless_firefox+. +# +# To use a headless driver, like Cuprite, update your Gemfile to use +# Cuprite instead of Selenium and then declare the driver name in the +# +application_system_test_case.rb+ file. In this case, you would leave out +# the +:using+ option because the driver is headless, but you can still use +# +:screen_size+ to change the size of the browser screen, also you can use +# +:options+ to pass options supported by the driver. Please refer to your +# driver documentation to learn about supported options. +# +# require "test_helper" +# require "capybara/cuprite" +# +# class ApplicationSystemTestCase < ActionDispatch::SystemTestCase +# driven_by :cuprite, screen_size: [1400, 1400], options: +# { js_errors: true } +# end +# +# Some drivers require browser capabilities to be passed as a block instead +# of through the +options+ hash. +# +# As an example, if you want to add mobile emulation on chrome, you'll have to +# create an instance of selenium's +Chrome::Options+ object and add +# capabilities with a block. +# +# The block will be passed an instance of ::Options where you can +# define the capabilities you want. Please refer to your driver documentation +# to learn about supported options. +# +# class ApplicationSystemTestCase < ActionDispatch::SystemTestCase +# driven_by :selenium, using: :chrome, screen_size: [1024, 768] do |driver_option| +# driver_option.add_emulation(device_name: 'iPhone 6') +# driver_option.add_extension('path/to/chrome_extension.crx') +# end +# end +# +# Because ActionDispatch::SystemTestCase is a shim between Capybara +# and Rails, any driver that is supported by Capybara is supported by system +# tests as long as you include the required gems and files. +# +# source://actionpack//lib/action_dispatch/system_test_case.rb#112 +class ActionDispatch::SystemTestCase < ::ActiveSupport::TestCase + include ::Capybara::DSL + include ::Capybara::Minitest::Assertions + include ::ActionDispatch::SystemTesting::TestHelpers::SetupAndTeardown + include ::ActionDispatch::SystemTesting::TestHelpers::ScreenshotHelper + + # @return [SystemTestCase] a new instance of SystemTestCase + # + # source://actionpack//lib/action_dispatch/system_test_case.rb#120 + def initialize(*_arg0); end + + private + + # source://actionpack//lib/action_dispatch/system_test_case.rb#181 + def method_missing(name, *args, &block); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/system_test_case.rb#189 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/system_test_case.rb#163 + def url_helpers; end + + class << self + # System Test configuration options + # + # The default settings are Selenium, using Chrome, with a screen size + # of 1400x1400. + # + # Examples: + # + # driven_by :cuprite + # + # driven_by :selenium, screen_size: [800, 800] + # + # driven_by :selenium, using: :chrome + # + # driven_by :selenium, using: :headless_chrome + # + # driven_by :selenium, using: :firefox + # + # driven_by :selenium, using: :headless_firefox + # + # source://actionpack//lib/action_dispatch/system_test_case.rb#156 + def driven_by(driver, using: T.unsafe(nil), screen_size: T.unsafe(nil), options: T.unsafe(nil), &capabilities); end + + # source://actionpack//lib/action_dispatch/system_test_case.rb#136 + def driver; end + + # source://actionpack//lib/action_dispatch/system_test_case.rb#136 + def driver=(value); end + + # source://actionpack//lib/action_dispatch/system_test_case.rb#136 + def driver?; end + + # source://actionpack//lib/action_dispatch/system_test_case.rb#126 + def start_application; end + end +end + +# source://actionpack//lib/action_dispatch/system_test_case.rb#118 +ActionDispatch::SystemTestCase::DEFAULT_HOST = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/system_testing/driver.rb#4 +module ActionDispatch::SystemTesting; end + +# source://actionpack//lib/action_dispatch/system_testing/browser.rb#5 +class ActionDispatch::SystemTesting::Browser + # @return [Browser] a new instance of Browser + # + # source://actionpack//lib/action_dispatch/system_testing/browser.rb#8 + def initialize(name); end + + # @yield [options] + # + # source://actionpack//lib/action_dispatch/system_testing/browser.rb#24 + def configure; end + + # Returns the value of attribute name. + # + # source://actionpack//lib/action_dispatch/system_testing/browser.rb#6 + def name; end + + # Returns the value of attribute options. + # + # source://actionpack//lib/action_dispatch/system_testing/browser.rb#6 + def options; end + + # driver_path can be configured as a proc. The webdrivers gem uses this + # proc to update web drivers. Running this proc early allows us to only + # update the webdriver once and avoid race conditions when using + # parallel tests. + # + # source://actionpack//lib/action_dispatch/system_testing/browser.rb#33 + def preload; end + + # source://actionpack//lib/action_dispatch/system_testing/browser.rb#13 + def type; end + + private + + # source://actionpack//lib/action_dispatch/system_testing/browser.rb#43 + def initialize_options; end + + # source://actionpack//lib/action_dispatch/system_testing/browser.rb#53 + def set_default_options; end + + # source://actionpack//lib/action_dispatch/system_testing/browser.rb#62 + def set_headless_chrome_browser_options; end + + # source://actionpack//lib/action_dispatch/system_testing/browser.rb#69 + def set_headless_firefox_browser_options; end +end + +# source://actionpack//lib/action_dispatch/system_testing/driver.rb#5 +class ActionDispatch::SystemTesting::Driver + # @return [Driver] a new instance of Driver + # + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#8 + def initialize(driver_type, **options, &capabilities); end + + # Returns the value of attribute name. + # + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#6 + def name; end + + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#33 + def use; end + + private + + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#58 + def browser_options; end + + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#44 + def register; end + + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#78 + def register_cuprite(app); end + + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#68 + def register_poltergeist(app); end + + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#82 + def register_rack_test(app); end + + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#62 + def register_selenium(app); end + + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#72 + def register_webkit(app); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#40 + def registerable?; end + + # source://actionpack//lib/action_dispatch/system_testing/driver.rb#86 + def setup; end +end + +# source://actionpack//lib/action_dispatch/system_testing/server.rb#5 +class ActionDispatch::SystemTesting::Server + # source://actionpack//lib/action_dispatch/system_testing/server.rb#12 + def run; end + + private + + # source://actionpack//lib/action_dispatch/system_testing/server.rb#26 + def set_port; end + + # source://actionpack//lib/action_dispatch/system_testing/server.rb#22 + def set_server; end + + # source://actionpack//lib/action_dispatch/system_testing/server.rb#17 + def setup; end + + class << self + # Returns the value of attribute silence_puma. + # + # source://actionpack//lib/action_dispatch/system_testing/server.rb#7 + def silence_puma; end + + # Sets the attribute silence_puma + # + # @param value the value to set the attribute silence_puma to. + # + # source://actionpack//lib/action_dispatch/system_testing/server.rb#7 + def silence_puma=(_arg0); end + end +end + +# source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#5 +module ActionDispatch::SystemTesting::TestHelpers; end + +# Screenshot helper for system testing. +# +# source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#7 +module ActionDispatch::SystemTesting::TestHelpers::ScreenshotHelper + # Takes a screenshot of the current page in the browser if the test + # failed. + # + # +take_failed_screenshot+ is called during system test teardown. + # + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#44 + def take_failed_screenshot; end + + # Takes a screenshot of the current page in the browser. + # + # +take_screenshot+ can be used at any point in your system tests to take + # a screenshot of the current state. This can be useful for debugging or + # automating visual testing. You can take multiple screenshots per test + # to investigate changes at different points during your test. These will be + # named with a sequential prefix (or 'failed' for failing tests) + # + # The screenshot will be displayed in your console, if supported. + # + # The default screenshots directory is +tmp/screenshots+ but you can set a different + # one with +Capybara.save_path+ + # + # You can set the +RAILS_SYSTEM_TESTING_SCREENSHOT_HTML+ environment variable to + # save the HTML from the page that is being screenshotted so you can investigate the + # elements on the page at the time of the screenshot + # + # You can set the +RAILS_SYSTEM_TESTING_SCREENSHOT+ environment variable to + # control the output. Possible values are: + # * [+simple+ (default)] Only displays the screenshot path. + # This is the default value. + # * [+inline+] Display the screenshot in the terminal using the + # iTerm image protocol (https://iterm2.com/documentation-images.html). + # * [+artifact+] Display the screenshot in the terminal, using the terminal + # artifact format (https://buildkite.github.io/terminal-to-html/inline-images/). + # + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#33 + def take_screenshot; end + + private + + # Returns the value of attribute _screenshot_counter. + # + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#49 + def _screenshot_counter; end + + # Sets the attribute _screenshot_counter + # + # @param value the value to set the attribute _screenshot_counter to. + # + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#49 + def _screenshot_counter=(_arg0); end + + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#90 + def absolute_html_path; end + + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#86 + def absolute_image_path; end + + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#78 + def absolute_path; end + + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#112 + def display_image; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#132 + def failed?; end + + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#74 + def html_path; end + + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#64 + def image_name; end + + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#70 + def image_path; end + + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#55 + def increment_unique; end + + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#128 + def inline_base64(path); end + + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#102 + def output_type; end + + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#94 + def save_html; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#51 + def save_html?; end + + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#98 + def save_image; end + + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#82 + def screenshots_dir; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#136 + def supports_screenshot?; end + + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#60 + def unique; end +end + +# source://actionpack//lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb#6 +module ActionDispatch::SystemTesting::TestHelpers::SetupAndTeardown + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb#13 + def after_teardown; end + + # source://actionpack//lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb#7 + def before_teardown; end +end + +# source://actionpack//lib/action_dispatch/testing/test_process.rb#7 +module ActionDispatch::TestProcess + include ::ActionDispatch::TestProcess::FixtureFile + + # @raise [NoMethodError] + # + # source://actionpack//lib/action_dispatch/testing/test_process.rb#30 + def assigns(key = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/testing/test_process.rb#44 + def cookies; end + + # source://actionpack//lib/action_dispatch/testing/test_process.rb#40 + def flash; end + + # source://actionpack//lib/action_dispatch/testing/test_process.rb#48 + def redirect_to_url; end + + # source://actionpack//lib/action_dispatch/testing/test_process.rb#36 + def session; end +end + +# source://actionpack//lib/action_dispatch/testing/test_process.rb#8 +module ActionDispatch::TestProcess::FixtureFile + # Shortcut for Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.file_fixture_path, path), type): + # + # post :change_avatar, params: { avatar: fixture_file_upload('david.png', 'image/png') } + # + # Default fixture files location is test/fixtures/files. + # + # To upload binary files on Windows, pass :binary as the last parameter. + # This will not affect other platforms: + # + # post :change_avatar, params: { avatar: fixture_file_upload('david.png', 'image/png', :binary) } + # + # source://actionpack//lib/action_dispatch/testing/test_process.rb#19 + def fixture_file_upload(path, mime_type = T.unsafe(nil), binary = T.unsafe(nil)); end +end + +# source://actionpack//lib/action_dispatch/testing/test_request.rb#7 +class ActionDispatch::TestRequest < ::ActionDispatch::Request + # source://actionpack//lib/action_dispatch/testing/test_request.rb#66 + def accept=(mime_types); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#46 + def action=(action_name); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#30 + def host=(host); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#50 + def if_modified_since=(last_modified); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#54 + def if_none_match=(etag); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#42 + def path=(path); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#34 + def port=(number); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#58 + def remote_addr=(addr); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#26 + def request_method=(method); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#38 + def request_uri=(uri); end + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#62 + def user_agent=(user_agent); end + + class << self + # Create a new test request with default +env+ values. + # + # source://actionpack//lib/action_dispatch/testing/test_request.rb#15 + def create(env = T.unsafe(nil)); end + + private + + # source://actionpack//lib/action_dispatch/testing/test_request.rb#21 + def default_env; end + end +end + +# source://actionpack//lib/action_dispatch/testing/test_request.rb#8 +ActionDispatch::TestRequest::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) + +# Integration test methods such as Integration::RequestHelpers#get +# and Integration::RequestHelpers#post return objects of class +# TestResponse, which represent the HTTP response results of the requested +# controller actions. +# +# See Response for more information on controller response objects. +# +# source://actionpack//lib/action_dispatch/testing/test_response.rb#12 +class ActionDispatch::TestResponse < ::ActionDispatch::Response + # Returns a parsed body depending on the response MIME type. When a parser + # corresponding to the MIME type is not found, it returns the raw body. + # + # ==== Examples + # get "/posts" + # response.content_type # => "text/html; charset=utf-8" + # response.parsed_body.class # => String + # response.parsed_body # => "\n\n..." + # + # get "/posts.json" + # response.content_type # => "application/json; charset=utf-8" + # response.parsed_body.class # => Array + # response.parsed_body # => [{"id"=>42, "title"=>"Title"},... + # + # get "/posts/42.json" + # response.content_type # => "application/json; charset=utf-8" + # response.parsed_body.class # => Hash + # response.parsed_body # => {"id"=>42, "title"=>"Title"} + # + # source://actionpack//lib/action_dispatch/testing/test_response.rb#35 + def parsed_body; end + + # source://actionpack//lib/action_dispatch/testing/test_response.rb#39 + def response_parser; end + + class << self + # source://actionpack//lib/action_dispatch/testing/test_response.rb#13 + def from_response(response); end + end +end + +# source://actionpack//lib/action_pack/gem_version.rb#3 +module ActionPack + class << self + # Returns the currently loaded version of Action Pack as a Gem::Version. + # + # source://actionpack//lib/action_pack/gem_version.rb#5 + def gem_version; end + + # Returns the currently loaded version of Action Pack as a Gem::Version. + # + # source://actionpack//lib/action_pack/version.rb#7 + def version; end + end +end + +# source://actionpack//lib/action_pack/gem_version.rb#9 +module ActionPack::VERSION; end + +# source://actionpack//lib/action_pack/gem_version.rb#10 +ActionPack::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# source://actionpack//lib/action_pack/gem_version.rb#11 +ActionPack::VERSION::MINOR = T.let(T.unsafe(nil), Integer) + +# source://actionpack//lib/action_pack/gem_version.rb#13 +ActionPack::VERSION::PRE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_pack/gem_version.rb#15 +ActionPack::VERSION::STRING = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_pack/gem_version.rb#12 +ActionPack::VERSION::TINY = T.let(T.unsafe(nil), Integer) + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#5 +module Mime + class << self + # source://actionpack//lib/action_dispatch/http/mime_type.rb#40 + def [](type); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#45 + def fetch(type, &block); end + end +end + +# ALL isn't a real MIME type, so we don't register it for lookup with the +# other concrete types. It's a wildcard match that we use for +respond_to+ +# negotiation internals. +# +# source://actionpack//lib/action_dispatch/http/mime_type.rb#333 +Mime::ALL = T.let(T.unsafe(nil), Mime::AllType) + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#319 +class Mime::AllType < ::Mime::Type + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # @return [AllType] a new instance of AllType + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#322 + def initialize; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#326 + def all?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#327 + def html?; end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#36 +Mime::EXTENSION_LOOKUP = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#37 +Mime::LOOKUP = T.let(T.unsafe(nil), Hash) + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#6 +class Mime::Mimes + include ::Enumerable + + # @return [Mimes] a new instance of Mimes + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#11 + def initialize; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#20 + def <<(type); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#25 + def delete_if; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#16 + def each(&block); end + + # Returns the value of attribute symbols. + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#7 + def symbols; end +end + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#335 +class Mime::NullType + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#338 + def nil?; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#346 + def ref; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#342 + def to_s; end + + private + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#353 + def method_missing(method, *args); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#349 + def respond_to_missing?(method, _); end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#35 +Mime::SET = T.let(T.unsafe(nil), Mime::Mimes) + +# Encapsulates the notion of a MIME type. Can be used at render time, for example, with: +# +# class PostsController < ActionController::Base +# def show +# @post = Post.find(params[:id]) +# +# respond_to do |format| +# format.html +# format.ics { render body: @post.to_ics, mime_type: Mime::Type.lookup("text/calendar") } +# format.xml { render xml: @post } +# end +# end +# end +# +# source://actionpack//lib/action_dispatch/http/mime_type.rb#64 +class Mime::Type + # @return [Type] a new instance of Type + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#234 + def initialize(string, symbol = T.unsafe(nil), synonyms = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#267 + def ==(mime_type); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#259 + def ===(list); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#281 + def =~(mime_type); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#297 + def all?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#274 + def eql?(other); end + + # Returns the value of attribute hash. + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#225 + def hash; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#293 + def html?; end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#287 + def match?(mime_type); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#255 + def ref; end + + # Returns the value of attribute symbol. + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#65 + def symbol; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#243 + def to_s; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#247 + def to_str; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#251 + def to_sym; end + + protected + + # Returns the value of attribute string. + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#300 + def string; end + + # Returns the value of attribute synonyms. + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#300 + def synonyms; end + + private + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#306 + def method_missing(method, *args); end + + # @return [Boolean] + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#314 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#304 + def to_a; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#303 + def to_ary; end + + class << self + # source://actionpack//lib/action_dispatch/http/mime_type.rb#144 + def lookup(string); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#148 + def lookup_by_extension(extension); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#172 + def parse(accept_header); end + + # For an input of 'text', returns [Mime[:json], Mime[:xml], Mime[:ics], + # Mime[:html], Mime[:css], Mime[:csv], Mime[:js], Mime[:yaml], Mime[:text]. + # + # For an input of 'application', returns [Mime[:html], Mime[:js], + # Mime[:xml], Mime[:yaml], Mime[:atom], Mime[:json], Mime[:rss], Mime[:url_encoded_form]. + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#206 + def parse_data_with_trailing_star(type); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#197 + def parse_trailing_star(accept_header); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#158 + def register(string, symbol, mime_type_synonyms = T.unsafe(nil), extension_synonyms = T.unsafe(nil), skip_lookup = T.unsafe(nil)); end + + # Registers an alias that's not used on MIME type lookup, but can be referenced directly. Especially useful for + # rendering different HTML versions depending on the user agent, like an iPhone. + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#154 + def register_alias(string, symbol, extension_synonyms = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#140 + def register_callback(&block); end + + # This method is opposite of register method. + # + # To unregister a MIME type: + # + # Mime::Type.unregister(:mobile) + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#215 + def unregister(symbol); end + end +end + +# A simple helper class used in parsing the accept header. +# +# source://actionpack//lib/action_dispatch/http/mime_type.rb#70 +class Mime::Type::AcceptItem + # @return [AcceptItem] a new instance of AcceptItem + # + # source://actionpack//lib/action_dispatch/http/mime_type.rb#74 + def initialize(index, name, q = T.unsafe(nil)); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#81 + def <=>(item); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 + def index; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 + def index=(_arg0); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 + def name; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 + def name=(_arg0); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 + def q; end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 + def q=(_arg0); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#71 + def to_s; end +end + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#88 +class Mime::Type::AcceptList + class << self + # source://actionpack//lib/action_dispatch/http/mime_type.rb#131 + def find_item_by_name(array, name); end + + # source://actionpack//lib/action_dispatch/http/mime_type.rb#89 + def sort!(list); end + end +end + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#232 +class Mime::Type::InvalidMimeType < ::StandardError; end + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#227 +Mime::Type::MIME_NAME = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#229 +Mime::Type::MIME_PARAMETER = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#228 +Mime::Type::MIME_PARAMETER_VALUE = T.let(T.unsafe(nil), String) + +# source://actionpack//lib/action_dispatch/http/mime_type.rb#230 +Mime::Type::MIME_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://actionpack//lib/action_dispatch.rb#33 +module Rack + class << self + # source://rack/2.2.6.4/lib/rack/version.rb#26 + def release; end + + # source://rack/2.2.6.4/lib/rack/version.rb#19 + def version; end + end +end diff --git a/sorbet/rbi/gems/actiontext@7.0.4.3.rbi b/sorbet/rbi/gems/actiontext@7.0.4.3.rbi new file mode 100644 index 0000000..df0e20b --- /dev/null +++ b/sorbet/rbi/gems/actiontext@7.0.4.3.rbi @@ -0,0 +1,8 @@ +# 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`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/actionview@7.0.4.3.rbi b/sorbet/rbi/gems/actionview@7.0.4.3.rbi new file mode 100644 index 0000000..2adf6d6 --- /dev/null +++ b/sorbet/rbi/gems/actionview@7.0.4.3.rbi @@ -0,0 +1,15460 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `actionview` gem. +# Please instead update this file by running `bin/tapioca gem actionview`. + +class ActionController::Base < ::ActionController::Metal + include ::ActionDispatch::Routing::PolymorphicRoutes + include ::ActionController::Head + include ::AbstractController::Caching::ConfigMethods + include ::ActionController::BasicImplicitRender + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks?; end + + # source://actionpack/7.0.4.3/lib/abstract_controller/helpers.rb#11 + def _helper_methods; end + + # source://actionpack/7.0.4.3/lib/abstract_controller/helpers.rb#11 + def _helper_methods=(_arg0); end + + # source://actionpack/7.0.4.3/lib/abstract_controller/helpers.rb#11 + def _helper_methods?; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#940 + def _process_action_callbacks; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/renderers.rb#31 + def _renderers; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/renderers.rb#31 + def _renderers=(_arg0); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/renderers.rb#31 + def _renderers?; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#928 + def _run_process_action_callbacks(&block); end + + # source://actionpack/7.0.4.3/lib/abstract_controller/caching.rb#42 + def _view_cache_dependencies; end + + # source://actionpack/7.0.4.3/lib/abstract_controller/caching.rb#42 + def _view_cache_dependencies=(_arg0); end + + # source://actionpack/7.0.4.3/lib/abstract_controller/caching.rb#42 + def _view_cache_dependencies?; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options=(_arg0); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options?; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/flash.rb#36 + def alert; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def allow_forgery_protection; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def allow_forgery_protection=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def asset_host; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def asset_host=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def assets_dir; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def assets_dir=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def default_asset_host_protocol; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def default_asset_host_protocol=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def default_protect_from_forgery; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def default_protect_from_forgery=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def default_static_extension; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def default_static_extension=(value); end + + # source://actionpack/7.0.4.3/lib/action_dispatch/routing/url_for.rb#95 + def default_url_options; end + + # source://actionpack/7.0.4.3/lib/action_dispatch/routing/url_for.rb#95 + def default_url_options=(_arg0); end + + # source://actionpack/7.0.4.3/lib/action_dispatch/routing/url_for.rb#95 + def default_url_options?; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def enable_fragment_cache_logging; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def enable_fragment_cache_logging=(value); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/etag_with_template_digest.rb#27 + def etag_with_template_digest; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/etag_with_template_digest.rb#27 + def etag_with_template_digest=(_arg0); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/etag_with_template_digest.rb#27 + def etag_with_template_digest?; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/conditional_get.rb#13 + def etaggers; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/conditional_get.rb#13 + def etaggers=(_arg0); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/conditional_get.rb#13 + def etaggers?; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/flash.rb#10 + def flash(*_arg0, **_arg1, &_arg2); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def forgery_protection_origin_check; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def forgery_protection_origin_check=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def forgery_protection_strategy; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def forgery_protection_strategy=(value); end + + # source://actionpack/7.0.4.3/lib/abstract_controller/caching/fragments.rb#23 + def fragment_cache_keys; end + + # source://actionpack/7.0.4.3/lib/abstract_controller/caching/fragments.rb#23 + def fragment_cache_keys=(_arg0); end + + # source://actionpack/7.0.4.3/lib/abstract_controller/caching/fragments.rb#23 + def fragment_cache_keys?; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/helpers.rb#63 + def helpers_path; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/helpers.rb#63 + def helpers_path=(_arg0); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/helpers.rb#63 + def helpers_path?; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/helpers.rb#64 + def include_all_helpers; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/helpers.rb#64 + def include_all_helpers=(_arg0); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/helpers.rb#64 + def include_all_helpers?; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def javascripts_dir; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def javascripts_dir=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def log_warning_on_csrf_failure; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def log_warning_on_csrf_failure=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def logger; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def logger=(value); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/flash.rb#36 + def notice; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def per_form_csrf_tokens; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def per_form_csrf_tokens=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def perform_caching; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def perform_caching=(value); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/redirecting.rb#13 + def raise_on_open_redirects; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/redirecting.rb#13 + def raise_on_open_redirects=(val); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def relative_url_root; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def relative_url_root=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def request_forgery_protection_token; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def request_forgery_protection_token=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/rescuable.rb#13 + def rescue_handlers; end + + # source://activesupport/7.0.4.3/lib/active_support/rescuable.rb#13 + def rescue_handlers=(_arg0); end + + # source://activesupport/7.0.4.3/lib/active_support/rescuable.rb#13 + def rescue_handlers?; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def stylesheets_dir; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def stylesheets_dir=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def urlsafe_csrf_tokens; end + + private + + # source://actionview//lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + # source://actionpack/7.0.4.3/lib/action_controller/base.rb#266 + def _protected_ivars; end + + class << self + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks?; end + + # source://actionpack/7.0.4.3/lib/action_controller/form_builder.rb#31 + def _default_form_builder; end + + # source://actionpack/7.0.4.3/lib/action_controller/form_builder.rb#31 + def _default_form_builder=(value); end + + # source://actionpack/7.0.4.3/lib/action_controller/form_builder.rb#31 + def _default_form_builder?; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/flash.rb#8 + def _flash_types; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/flash.rb#8 + def _flash_types=(value); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/flash.rb#8 + def _flash_types?; end + + # source://actionpack/7.0.4.3/lib/abstract_controller/helpers.rb#11 + def _helper_methods; end + + # source://actionpack/7.0.4.3/lib/abstract_controller/helpers.rb#11 + def _helper_methods=(value); end + + # source://actionpack/7.0.4.3/lib/abstract_controller/helpers.rb#11 + def _helper_methods?; end + + # source://actionpack/7.0.4.3/lib/abstract_controller/helpers.rb#15 + def _helpers; end + + # source://actionview//lib/action_view/layouts.rb#209 + def _layout; end + + # source://actionview//lib/action_view/layouts.rb#209 + def _layout=(value); end + + # source://actionview//lib/action_view/layouts.rb#209 + def _layout?; end + + # source://actionview//lib/action_view/layouts.rb#210 + def _layout_conditions; end + + # source://actionview//lib/action_view/layouts.rb#210 + def _layout_conditions=(value); end + + # source://actionview//lib/action_view/layouts.rb#210 + def _layout_conditions?; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#932 + def _process_action_callbacks; end + + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#936 + def _process_action_callbacks=(value); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/renderers.rb#31 + def _renderers; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/renderers.rb#31 + def _renderers=(value); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/renderers.rb#31 + def _renderers?; end + + # source://actionpack/7.0.4.3/lib/abstract_controller/caching.rb#42 + def _view_cache_dependencies; end + + # source://actionpack/7.0.4.3/lib/abstract_controller/caching.rb#42 + def _view_cache_dependencies=(value); end + + # source://actionpack/7.0.4.3/lib/abstract_controller/caching.rb#42 + def _view_cache_dependencies?; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options=(value); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/params_wrapper.rb#185 + def _wrapper_options?; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def allow_forgery_protection; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def allow_forgery_protection=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def asset_host; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def asset_host=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def assets_dir; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def assets_dir=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def default_asset_host_protocol; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def default_asset_host_protocol=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def default_protect_from_forgery; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def default_protect_from_forgery=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def default_static_extension; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def default_static_extension=(value); end + + # source://actionpack/7.0.4.3/lib/action_dispatch/routing/url_for.rb#95 + def default_url_options; end + + # source://actionpack/7.0.4.3/lib/action_dispatch/routing/url_for.rb#95 + def default_url_options=(value); end + + # source://actionpack/7.0.4.3/lib/action_dispatch/routing/url_for.rb#95 + def default_url_options?; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def enable_fragment_cache_logging; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def enable_fragment_cache_logging=(value); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/etag_with_template_digest.rb#27 + def etag_with_template_digest; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/etag_with_template_digest.rb#27 + def etag_with_template_digest=(value); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/etag_with_template_digest.rb#27 + def etag_with_template_digest?; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/conditional_get.rb#13 + def etaggers; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/conditional_get.rb#13 + def etaggers=(value); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/conditional_get.rb#13 + def etaggers?; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def forgery_protection_origin_check; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def forgery_protection_origin_check=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def forgery_protection_strategy; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def forgery_protection_strategy=(value); end + + # source://actionpack/7.0.4.3/lib/abstract_controller/caching/fragments.rb#23 + def fragment_cache_keys; end + + # source://actionpack/7.0.4.3/lib/abstract_controller/caching/fragments.rb#23 + def fragment_cache_keys=(value); end + + # source://actionpack/7.0.4.3/lib/abstract_controller/caching/fragments.rb#23 + def fragment_cache_keys?; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/helpers.rb#63 + def helpers_path; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/helpers.rb#63 + def helpers_path=(value); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/helpers.rb#63 + def helpers_path?; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/helpers.rb#64 + def include_all_helpers; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/helpers.rb#64 + def include_all_helpers=(value); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/helpers.rb#64 + def include_all_helpers?; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def javascripts_dir; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def javascripts_dir=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def log_warning_on_csrf_failure; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def log_warning_on_csrf_failure=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def logger; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def logger=(value); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal.rb#210 + def middleware_stack; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def per_form_csrf_tokens; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def per_form_csrf_tokens=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def perform_caching; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def perform_caching=(value); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/redirecting.rb#13 + def raise_on_open_redirects; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/redirecting.rb#13 + def raise_on_open_redirects=(val); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def relative_url_root; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def relative_url_root=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def request_forgery_protection_token; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def request_forgery_protection_token=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/rescuable.rb#13 + def rescue_handlers; end + + # source://activesupport/7.0.4.3/lib/active_support/rescuable.rb#13 + def rescue_handlers=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/rescuable.rb#13 + def rescue_handlers?; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def stylesheets_dir; end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#114 + def stylesheets_dir=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/configurable.rb#113 + def urlsafe_csrf_tokens; end + + # source://actionpack/7.0.4.3/lib/action_controller/metal/request_forgery_protection.rb#97 + def urlsafe_csrf_tokens=(urlsafe_csrf_tokens); end + + # source://actionpack/7.0.4.3/lib/action_controller/base.rb#198 + def without_modules(*modules); end + end +end + +# source://actionview//lib/action_view/gem_version.rb#3 +module ActionView + extend ::ActiveSupport::Autoload + + class << self + # source://actionview//lib/action_view.rb#90 + def eager_load!; end + + # Returns the currently loaded version of Action View as a Gem::Version. + # + # source://actionview//lib/action_view/gem_version.rb#5 + def gem_version; end + + # Returns the currently loaded version of Action View as a Gem::Version. + # + # source://actionview//lib/action_view/version.rb#7 + def version; end + end +end + +# This class defines the interface for a renderer. Each class that +# subclasses +AbstractRenderer+ is used by the base +Renderer+ class to +# render a specific type of object. +# +# The base +Renderer+ class uses its +render+ method to delegate to the +# renderers. These currently consist of +# +# PartialRenderer - Used for rendering partials +# TemplateRenderer - Used for rendering other types of templates +# StreamingTemplateRenderer - Used for streaming +# +# Whenever the +render+ method is called on the base +Renderer+ class, a new +# renderer object of the correct type is created, and the +render+ method on +# that new object is called in turn. This abstracts the set up and rendering +# into a separate classes for partials and templates. +# +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#21 +class ActionView::AbstractRenderer + # @return [AbstractRenderer] a new instance of AbstractRenderer + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#24 + def initialize(lookup_context); end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#22 + def any_templates?(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#22 + def formats(*_arg0, **_arg1, &_arg2); end + + # @raise [NotImplementedError] + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#28 + def render; end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#22 + def template_exists?(*_arg0, **_arg1, &_arg2); end + + private + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#182 + def build_rendered_collection(templates, spacer); end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#178 + def build_rendered_template(content, template); end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#159 + def extract_details(options); end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#171 + def prepend_formats(formats); end +end + +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#157 +ActionView::AbstractRenderer::NO_DETAILS = T.let(T.unsafe(nil), Hash) + +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#32 +module ActionView::AbstractRenderer::ObjectRendering + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#37 + def initialize(lookup_context, options); end + + private + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#43 + def local_variable(path); end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#92 + def merge_prefix_into_object_path(prefix, object_path); end + + # Obtains the path to where the object's partial is located. If the object + # responds to +to_partial_path+, then +to_partial_path+ will be called and + # will provide the path. If the object does not respond to +to_partial_path+, + # then an +ArgumentError+ is raised. + # + # If +prefix_partial_path_with_controller_namespace+ is true, then this + # method will prefix the partial paths with a namespace. + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#76 + def partial_path(object, view); end + + # @raise [ArgumentError] + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#61 + def raise_invalid_identifier(path); end + + # @raise [ArgumentError] + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#65 + def raise_invalid_option_as(as); end +end + +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#54 +ActionView::AbstractRenderer::ObjectRendering::IDENTIFIER_ERROR_MESSAGE = T.let(T.unsafe(nil), String) + +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#57 +ActionView::AbstractRenderer::ObjectRendering::OPTION_AS_ERROR_MESSAGE = T.let(T.unsafe(nil), String) + +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#33 +ActionView::AbstractRenderer::ObjectRendering::PREFIXED_PARTIAL_NAMES = T.let(T.unsafe(nil), Concurrent::Map) + +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#110 +class ActionView::AbstractRenderer::RenderedCollection + # @return [RenderedCollection] a new instance of RenderedCollection + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#117 + def initialize(rendered_templates, spacer); end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#122 + def body; end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#126 + def format; end + + # Returns the value of attribute rendered_templates. + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#115 + def rendered_templates; end + + class << self + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#111 + def empty(format); end + end +end + +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#130 +class ActionView::AbstractRenderer::RenderedCollection::EmptyCollection + # @return [EmptyCollection] a new instance of EmptyCollection + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#133 + def initialize(format); end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#137 + def body; end + + # Returns the value of attribute format. + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#131 + def format; end +end + +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#141 +class ActionView::AbstractRenderer::RenderedTemplate + # @return [RenderedTemplate] a new instance of RenderedTemplate + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#144 + def initialize(body, template); end + + # Returns the value of attribute body. + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#142 + def body; end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#149 + def format; end + + # Returns the value of attribute template. + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#142 + def template; end +end + +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#153 +ActionView::AbstractRenderer::RenderedTemplate::EMPTY_SPACER = T.let(T.unsafe(nil), T.untyped) + +# = Action View Errors +# +# source://actionview//lib/action_view/template/error.rb#7 +class ActionView::ActionViewError < ::StandardError; end + +# = Action View Base +# +# Action View templates can be written in several ways. +# If the template file has a .erb extension, then it uses the erubi[https://rubygems.org/gems/erubi] +# template system which can embed Ruby into an HTML document. +# If the template file has a .builder extension, then Jim Weirich's Builder::XmlMarkup library is used. +# +# == ERB +# +# You trigger ERB by using embeddings such as <% %>, <% -%>, and <%= %>. The <%= %> tag set is used when you want output. Consider the +# following loop for names: +# +# Names of all the people +# <% @people.each do |person| %> +# Name: <%= person.name %>
+# <% end %> +# +# The loop is set up in regular embedding tags <% %>, and the name is written using the output embedding tag <%= %>. Note that this +# is not just a usage suggestion. Regular output functions like print or puts won't work with ERB templates. So this would be wrong: +# +# <%# WRONG %> +# Hi, Mr. <% puts "Frodo" %> +# +# If you absolutely must write from within a function use +concat+. +# +# When on a line that only contains whitespaces except for the tag, <% %> suppresses leading and trailing whitespace, +# including the trailing newline. <% %> and <%- -%> are the same. +# Note however that <%= %> and <%= -%> are different: only the latter removes trailing whitespaces. +# +# === Using sub templates +# +# Using sub templates allows you to sidestep tedious replication and extract common display structures in shared templates. The +# classic example is the use of a header and footer (even though the Action Pack-way would be to use Layouts): +# +# <%= render "shared/header" %> +# Something really specific and terrific +# <%= render "shared/footer" %> +# +# As you see, we use the output embeddings for the render methods. The render call itself will just return a string holding the +# result of the rendering. The output embedding writes it to the current template. +# +# But you don't have to restrict yourself to static includes. Templates can share variables amongst themselves by using instance +# variables defined using the regular embedding tags. Like this: +# +# <% @page_title = "A Wonderful Hello" %> +# <%= render "shared/header" %> +# +# Now the header can pick up on the @page_title variable and use it for outputting a title tag: +# +# <%= @page_title %> +# +# === Passing local variables to sub templates +# +# You can pass local variables to sub templates by using a hash with the variable names as keys and the objects as values: +# +# <%= render "shared/header", { headline: "Welcome", person: person } %> +# +# These can now be accessed in shared/header with: +# +# Headline: <%= headline %> +# First name: <%= person.first_name %> +# +# The local variables passed to sub templates can be accessed as a hash using the local_assigns hash. This lets you access the +# variables as: +# +# Headline: <%= local_assigns[:headline] %> +# +# This is useful in cases where you aren't sure if the local variable has been assigned. Alternatively, you could also use +# defined? headline to first check if the variable has been assigned before using it. +# +# === Template caching +# +# By default, Rails will compile each template to a method in order to render it. When you alter a template, +# Rails will check the file's modification time and recompile it in development mode. +# +# == Builder +# +# Builder templates are a more programmatic alternative to ERB. They are especially useful for generating XML content. An XmlMarkup object +# named +xml+ is automatically made available to templates with a .builder extension. +# +# Here are some basic examples: +# +# xml.em("emphasized") # => emphasized +# xml.em { xml.b("emph & bold") } # => emph & bold +# xml.a("A Link", "href" => "http://onestepback.org") # => A Link +# xml.target("name" => "compile", "option" => "fast") # => +# # NOTE: order of attributes is not specified. +# +# Any method with a block will be treated as an XML markup tag with nested markup in the block. For example, the following: +# +# xml.div do +# xml.h1(@person.name) +# xml.p(@person.bio) +# end +# +# would produce something like: +# +#
+#

David Heinemeier Hansson

+#

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

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

    foo

    "), "

    bar

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

    foo

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

    foo

    "), raw("

    bar

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

    foo


    bar

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

    Hello world!

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

    Hello world!

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

    All titles fit to print

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

    Hello world!

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

    The next great American novel starts here.

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

    Example

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

    Example

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

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

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

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

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

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

    We want to put a paragraph...

    \n\n

    ...right there.

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

    Look ma! A class!

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

    Unblinkable.

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

    Blinkable! It's true.

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

    Once upon a time in a world far far away

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

    Once upon a time in a world far far away

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

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

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

    <%= @page_title %>

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

    Welcome

    +# Off-world colonies offers you a chance to start a new life +# +# == Layout assignment +# +# You can either specify a layout declaratively (using the #layout class method) or give +# it the same name as your controller, and place it in app/views/layouts. +# If a subclass does not have a layout specified, it inherits its layout using normal Ruby inheritance. +# +# For instance, if you have PostsController and a template named app/views/layouts/posts.html.erb, +# that template will be used for all actions in PostsController and controllers inheriting +# from PostsController. +# +# If you use a module, for instance Weblog::PostsController, you will need a template named +# app/views/layouts/weblog/posts.html.erb. +# +# Since all your controllers inherit from ApplicationController, they will use +# app/views/layouts/application.html.erb if no other layout is specified +# or provided. +# +# == Inheritance Examples +# +# class BankController < ActionController::Base +# # bank.html.erb exists +# +# class ExchangeController < BankController +# # exchange.html.erb exists +# +# class CurrencyController < BankController +# +# class InformationController < BankController +# layout "information" +# +# class TellerController < InformationController +# # teller.html.erb exists +# +# class EmployeeController < InformationController +# # employee.html.erb exists +# layout nil +# +# class VaultController < BankController +# layout :access_level_layout +# +# class TillController < BankController +# layout false +# +# In these examples, we have three implicit lookup scenarios: +# * The +BankController+ uses the "bank" layout. +# * The +ExchangeController+ uses the "exchange" layout. +# * The +CurrencyController+ inherits the layout from BankController. +# +# However, when a layout is explicitly set, the explicitly set layout wins: +# * The +InformationController+ uses the "information" layout, explicitly set. +# * The +TellerController+ also uses the "information" layout, because the parent explicitly set it. +# * The +EmployeeController+ uses the "employee" layout, because it set the layout to +nil+, resetting the parent configuration. +# * The +VaultController+ chooses a layout dynamically by calling the access_level_layout method. +# * The +TillController+ does not use a layout at all. +# +# == Types of layouts +# +# Layouts are basically just regular templates, but the name of this template needs not be specified statically. Sometimes +# you want to alternate layouts depending on runtime information, such as whether someone is logged in or not. This can +# be done either by specifying a method reference as a symbol or using an inline method (as a proc). +# +# The method reference is the preferred approach to variable layouts and is used like this: +# +# class WeblogController < ActionController::Base +# layout :writers_and_readers +# +# def index +# # fetching posts +# end +# +# private +# def writers_and_readers +# logged_in? ? "writer_layout" : "reader_layout" +# end +# end +# +# Now when a new request for the index action is processed, the layout will vary depending on whether the person accessing +# is logged in or not. +# +# If you want to use an inline method, such as a proc, do something like this: +# +# class WeblogController < ActionController::Base +# layout proc { |controller| controller.logged_in? ? "writer_layout" : "reader_layout" } +# end +# +# If an argument isn't given to the proc, it's evaluated in the context of +# the current controller anyway. +# +# class WeblogController < ActionController::Base +# layout proc { logged_in? ? "writer_layout" : "reader_layout" } +# end +# +# Of course, the most common way of specifying a layout is still just as a plain template name: +# +# class WeblogController < ActionController::Base +# layout "weblog_standard" +# end +# +# The template will be looked always in app/views/layouts/ folder. But you can point +# layouts folder direct also. layout "layouts/demo" is the same as layout "demo". +# +# Setting the layout to +nil+ forces it to be looked up in the filesystem and fallbacks to the parent behavior if none exists. +# Setting it to +nil+ is useful to re-enable template lookup overriding a previous configuration set in the parent: +# +# class ApplicationController < ActionController::Base +# layout "application" +# end +# +# class PostsController < ApplicationController +# # Will use "application" layout +# end +# +# class CommentsController < ApplicationController +# # Will search for "comments" layout and fallback "application" layout +# layout nil +# end +# +# == Conditional layouts +# +# If you have a layout that by default is applied to all the actions of a controller, you still have the option of rendering +# a given action or set of actions without a layout, or restricting a layout to only a single action or a set of actions. The +# :only and :except options can be passed to the layout call. For example: +# +# class WeblogController < ActionController::Base +# layout "weblog_standard", except: :rss +# +# # ... +# +# end +# +# This will assign "weblog_standard" as the WeblogController's layout for all actions except for the +rss+ action, which will +# be rendered directly, without wrapping a layout around the rendered view. +# +# Both the :only and :except condition can accept an arbitrary number of method references, so +# except: [ :rss, :text_only ] is valid, as is except: :rss. +# +# == Using a different layout in the action render call +# +# If most of your actions use the same layout, it makes perfect sense to define a controller-wide layout as described above. +# Sometimes you'll have exceptions where one action wants to use a different layout than the rest of the controller. +# You can do this by passing a :layout option to the render call. For example: +# +# class WeblogController < ActionController::Base +# layout "weblog_standard" +# +# def help +# render action: "help", layout: "help" +# end +# end +# +# This will override the controller-wide "weblog_standard" layout, and will render the help action with the "help" layout instead. +# +# source://actionview//lib/action_view/layouts.rb#203 +module ActionView::Layouts + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActionView::ViewPaths + include ::ActionView::Rendering + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods + mixes_in_class_methods ::ActionView::Rendering::ClassMethods + mixes_in_class_methods ::ActionView::Layouts::ClassMethods + + # source://actionview//lib/action_view/layouts.rb#361 + def initialize(*_arg0); end + + # source://actionview//lib/action_view/layouts.rb#215 + def _layout_conditions(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/layouts.rb#350 + def _normalize_options(options); end + + def action_has_layout=(_arg0); end + + # Controls whether an action should be rendered using a layout. + # If you want to disable any layout settings for the + # current action so that it is rendered without a layout then + # either override this method in your controller to return false + # for that action or set the action_has_layout attribute + # to false before rendering. + # + # @return [Boolean] + # + # source://actionview//lib/action_view/layouts.rb#372 + def action_has_layout?; end + + private + + # @return [Boolean] + # + # source://actionview//lib/action_view/layouts.rb#377 + def _conditional_layout?; end + + # Returns the default layout for this controller. + # Optionally raises an exception if the layout could not be found. + # + # ==== Parameters + # * formats - The formats accepted to this layout + # * require_layout - If set to +true+ and layout is not found, + # an +ArgumentError+ exception is raised (defaults to +false+) + # + # ==== Returns + # * template - The template object for the default layout (or +nil+) + # + # source://actionview//lib/action_view/layouts.rb#415 + def _default_layout(lookup_context, formats, require_layout = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/layouts.rb#430 + def _include_layout?(options); end + + # This will be overwritten by _write_layout_method + # + # source://actionview//lib/action_view/layouts.rb#382 + def _layout(*_arg0); end + + # Determine the layout for a given name, taking into account the name type. + # + # ==== Parameters + # * name - The name of the template + # + # source://actionview//lib/action_view/layouts.rb#388 + def _layout_for_option(name); end + + # source://actionview//lib/action_view/layouts.rb#401 + def _normalize_layout(value); end + + module GeneratedClassMethods + def _layout; end + def _layout=(value); end + def _layout?; end + def _layout_conditions; end + def _layout_conditions=(value); end + def _layout_conditions?; end + end + + module GeneratedInstanceMethods; end +end + +# source://actionview//lib/action_view/layouts.rb#217 +module ActionView::Layouts::ClassMethods + # Creates a _layout method to be called by _default_layout . + # + # If a layout is not explicitly mentioned then look for a layout with the controller's name. + # if nothing is found then try same procedure to find super class's layout. + # + # source://actionview//lib/action_view/layouts.rb#283 + def _write_layout_method; end + + # source://actionview//lib/action_view/layouts.rb#218 + def inherited(klass); end + + # Specify the layout to use for this class. + # + # If the specified layout is a: + # String:: the String is the template name + # Symbol:: call the method specified by the symbol + # Proc:: call the passed Proc + # false:: There is no layout + # true:: raise an ArgumentError + # nil:: Force default layout behavior with inheritance + # + # Return value of +Proc+ and +Symbol+ arguments should be +String+, +false+, +true+, or +nil+ + # with the same meaning as described above. + # + # ==== Parameters + # + # * layout - The layout to use. + # + # ==== Options (conditions) + # + # * +:only+ - A list of actions to apply this layout to. + # * +:except+ - Apply this layout to all actions but this one. + # + # source://actionview//lib/action_view/layouts.rb#269 + def layout(layout, conditions = T.unsafe(nil)); end + + private + + # If no layout is supplied, look for a template named the return + # value of this method. + # + # ==== Returns + # * String - A template name + # + # source://actionview//lib/action_view/layouts.rb#345 + def _implied_layout_name; end +end + +# This module is mixed in if layout conditions are provided. This means +# that if no layout conditions are used, this method is not used +# +# source://actionview//lib/action_view/layouts.rb#225 +module ActionView::Layouts::ClassMethods::LayoutConditions + private + + # Determines whether the current action has a layout definition by + # checking the action name against the :only and :except conditions + # set by the layout method. + # + # ==== Returns + # * Boolean - True if the action has a layout definition, false otherwise. + # + # @return [Boolean] + # + # source://actionview//lib/action_view/layouts.rb#233 + def _conditional_layout?; end +end + +# = Action View Log Subscriber +# +# Provides functionality so that Rails can output logs from Action View. +# +# source://actionview//lib/action_view/log_subscriber.rb#9 +class ActionView::LogSubscriber < ::ActiveSupport::LogSubscriber + # @return [LogSubscriber] a new instance of LogSubscriber + # + # source://actionview//lib/action_view/log_subscriber.rb#12 + def initialize; end + + # source://actionview//lib/action_view/log_subscriber.rb#59 + def logger; end + + # source://actionview//lib/action_view/log_subscriber.rb#42 + def render_collection(event); end + + # source://actionview//lib/action_view/log_subscriber.rb#35 + def render_layout(event); end + + # source://actionview//lib/action_view/log_subscriber.rb#25 + def render_partial(event); end + + # source://actionview//lib/action_view/log_subscriber.rb#17 + def render_template(event); end + + # source://actionview//lib/action_view/log_subscriber.rb#53 + def start(name, id, payload); end + + private + + # source://actionview//lib/action_view/log_subscriber.rb#83 + def cache_message(payload); end + + # source://actionview//lib/action_view/log_subscriber.rb#65 + def from_rails_root(string); end + + # source://actionview//lib/action_view/log_subscriber.rb#92 + def log_rendering_start(payload, name); end + + # source://actionview//lib/action_view/log_subscriber.rb#71 + def rails_root; end + + # source://actionview//lib/action_view/log_subscriber.rb#75 + def render_count(payload); end +end + +# source://actionview//lib/action_view/log_subscriber.rb#64 +ActionView::LogSubscriber::EMPTY = T.let(T.unsafe(nil), String) + +# source://actionview//lib/action_view/log_subscriber.rb#10 +ActionView::LogSubscriber::VIEWS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# = Action View Lookup Context +# +# LookupContext is the object responsible for holding all information +# required for looking up templates, i.e. view paths and details. +# LookupContext is also responsible for generating a key, given to +# view paths, used in the resolver cache lookup. Since this key is generated +# only once during the request, it speeds up all cache accesses. +# +# source://actionview//lib/action_view/lookup_context.rb#15 +class ActionView::LookupContext + include ::ActionView::LookupContext::Accessors + include ::ActionView::LookupContext::DetailsCache + include ::ActionView::LookupContext::ViewPaths + + # @return [LookupContext] a new instance of LookupContext + # + # source://actionview//lib/action_view/lookup_context.rb#216 + def initialize(view_paths, details = T.unsafe(nil), prefixes = T.unsafe(nil)); end + + # source://actionview//lib/action_view/lookup_context.rb#226 + def digest_cache; end + + # Override formats= to expand ["*/*"] values and automatically + # add :html as fallback to :js. + # + # source://actionview//lib/action_view/lookup_context.rb#247 + def formats=(values); end + + # Override locale to return a symbol instead of array. + # + # source://actionview//lib/action_view/lookup_context.rb#267 + def locale; end + + # Overload locale= to also set the I18n.locale. If the current I18n.config object responds + # to original_config, it means that it has a copy of the original I18n configuration and it's + # acting as proxy, which we need to skip. + # + # source://actionview//lib/action_view/lookup_context.rb#274 + def locale=(value); end + + # source://actionview//lib/action_view/lookup_context.rb#16 + def prefixes; end + + # source://actionview//lib/action_view/lookup_context.rb#16 + def prefixes=(_arg0); end + + # source://actionview//lib/action_view/lookup_context.rb#16 + def rendered_format; end + + # source://actionview//lib/action_view/lookup_context.rb#16 + def rendered_format=(_arg0); end + + # source://actionview//lib/action_view/lookup_context.rb#230 + def with_prepended_formats(formats); end + + private + + # source://actionview//lib/action_view/lookup_context.rb#237 + def initialize_details(target, details); end + + class << self + # source://actionview//lib/action_view/lookup_context.rb#21 + def register_detail(name, &block); end + + # source://actionview//lib/action_view/lookup_context.rb#18 + def registered_details; end + + # source://actionview//lib/action_view/lookup_context.rb#18 + def registered_details=(_arg0); end + end +end + +# Holds accessors for the registered details. +# +# source://actionview//lib/action_view/lookup_context.rb#39 +module ActionView::LookupContext::Accessors + # source://actionview//lib/action_view/lookup_context.rb#50 + def default_formats; end + + # source://actionview//lib/action_view/lookup_context.rb#52 + def default_handlers; end + + # source://actionview//lib/action_view/lookup_context.rb#43 + def default_locale; end + + # source://actionview//lib/action_view/lookup_context.rb#51 + def default_variants; end + + # source://actionview//lib/action_view/lookup_context.rb#27 + def formats; end + + # source://actionview//lib/action_view/lookup_context.rb#31 + def formats=(value); end + + # source://actionview//lib/action_view/lookup_context.rb#27 + def handlers; end + + # source://actionview//lib/action_view/lookup_context.rb#31 + def handlers=(value); end + + # source://actionview//lib/action_view/lookup_context.rb#27 + def locale; end + + # source://actionview//lib/action_view/lookup_context.rb#31 + def locale=(value); end + + # source://actionview//lib/action_view/lookup_context.rb#27 + def variants; end + + # source://actionview//lib/action_view/lookup_context.rb#31 + def variants=(value); end +end + +# source://actionview//lib/action_view/lookup_context.rb#40 +ActionView::LookupContext::Accessors::DEFAULT_PROCS = T.let(T.unsafe(nil), Hash) + +# Add caching behavior on top of Details. +# +# source://actionview//lib/action_view/lookup_context.rb#94 +module ActionView::LookupContext::DetailsCache + # Returns the value of attribute cache. + # + # source://actionview//lib/action_view/lookup_context.rb#95 + def cache; end + + # Sets the attribute cache + # + # @param value the value to set the attribute cache to. + # + # source://actionview//lib/action_view/lookup_context.rb#95 + def cache=(_arg0); end + + # Calculate the details key. Remove the handlers from calculation to improve performance + # since the user cannot modify it explicitly. + # + # source://actionview//lib/action_view/lookup_context.rb#99 + def details_key; end + + # Temporary skip passing the details_key forward. + # + # source://actionview//lib/action_view/lookup_context.rb#104 + def disable_cache; end + + private + + # source://actionview//lib/action_view/lookup_context.rb#112 + def _set_detail(key, value); end +end + +# source://actionview//lib/action_view/lookup_context.rb#54 +class ActionView::LookupContext::DetailsKey + def eql?(_arg0); end + + class << self + # source://actionview//lib/action_view/lookup_context.rb#73 + def clear; end + + # source://actionview//lib/action_view/lookup_context.rb#65 + def details_cache_key(details); end + + # source://actionview//lib/action_view/lookup_context.rb#61 + def digest_cache(details); end + + # source://actionview//lib/action_view/lookup_context.rb#82 + def digest_caches; end + + # source://actionview//lib/action_view/lookup_context.rb#86 + def view_context_class(klass); end + end +end + +# Helpers related to template lookup using the lookup context information. +# +# source://actionview//lib/action_view/lookup_context.rb#121 +module ActionView::LookupContext::ViewPaths + # @return [Boolean] + # + # source://actionview//lib/action_view/lookup_context.rb#144 + def any?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/lookup_context.rb#144 + def any_templates?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/lookup_context.rb#137 + def exists?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), **options); end + + # source://actionview//lib/action_view/lookup_context.rb#124 + def find(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/lookup_context.rb#131 + def find_all(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/lookup_context.rb#124 + def find_template(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns the value of attribute html_fallback_for_js. + # + # source://actionview//lib/action_view/lookup_context.rb#122 + def html_fallback_for_js; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/lookup_context.rb#137 + def template_exists?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), **options); end + + # Returns the value of attribute view_paths. + # + # source://actionview//lib/action_view/lookup_context.rb#122 + def view_paths; end + + private + + # Whenever setting view paths, makes a copy so that we can manipulate them in + # instance objects as we wish. + # + # source://actionview//lib/action_view/lookup_context.rb#154 + def build_view_paths(paths); end + + # Compute details hash and key according to user options (e.g. passed from #render). + # + # source://actionview//lib/action_view/lookup_context.rb#159 + def detail_args_for(options); end + + # source://actionview//lib/action_view/lookup_context.rb#172 + def detail_args_for_any; end + + # Fix when prefix is specified as part of the template name + # + # source://actionview//lib/action_view/lookup_context.rb#193 + def normalize_name(name, prefixes); end +end + +# source://actionview//lib/action_view/template/error.rb#29 +class ActionView::MissingTemplate < ::ActionView::ActionViewError + include ::DidYouMean::Correctable + + # @return [MissingTemplate] a new instance of MissingTemplate + # + # source://actionview//lib/action_view/template/error.rb#32 + def initialize(paths, path, prefixes, partial, details, *_arg5); end + + # Apps may have thousands of candidate templates so we attempt to + # generate the suggestions as efficiently as possible. + # First we split templates into prefixes and basenames, so that those can + # be matched separately. + # + # source://actionview//lib/action_view/template/error.rb#92 + def corrections; end + + # Returns the value of attribute partial. + # + # source://actionview//lib/action_view/template/error.rb#30 + def partial; end + + # Returns the value of attribute path. + # + # source://actionview//lib/action_view/template/error.rb#30 + def path; end + + # Returns the value of attribute paths. + # + # source://actionview//lib/action_view/template/error.rb#30 + def paths; end + + # Returns the value of attribute prefixes. + # + # source://actionview//lib/action_view/template/error.rb#30 + def prefixes; end +end + +# source://actionview//lib/action_view/template/error.rb#59 +class ActionView::MissingTemplate::Results + # @return [Results] a new instance of Results + # + # source://actionview//lib/action_view/template/error.rb#62 + def initialize(size); end + + # source://actionview//lib/action_view/template/error.rb#79 + def add(path, score); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template/error.rb#71 + def should_record?(score); end + + # source://actionview//lib/action_view/template/error.rb#67 + def to_a; end +end + +# source://actionview//lib/action_view/template/error.rb#60 +class ActionView::MissingTemplate::Results::Result < ::Struct + # Returns the value of attribute path + # + # @return [Object] the current value of path + def path; end + + # Sets the attribute path + # + # @param value [Object] the value to set the attribute path to. + # @return [Object] the newly set value + def path=(_); end + + # Returns the value of attribute score + # + # @return [Object] the current value of score + def score; end + + # Sets the attribute score + # + # @param value [Object] the value to set the attribute score to. + # @return [Object] the newly set value + def score=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://actionview//lib/action_view/model_naming.rb#4 +module ActionView::ModelNaming + # Converts the given object to an Active Model compliant one. + # + # source://actionview//lib/action_view/model_naming.rb#6 + def convert_to_model(object); end + + # source://actionview//lib/action_view/model_naming.rb#10 + def model_name_from_record_or_class(record_or_class); end +end + +# source://actionview//lib/action_view/renderer/object_renderer.rb#4 +class ActionView::ObjectRenderer < ::ActionView::PartialRenderer + include ::ActionView::AbstractRenderer::ObjectRendering + + # @return [ObjectRenderer] a new instance of ObjectRenderer + # + # source://actionview//lib/action_view/renderer/object_renderer.rb#7 + def initialize(lookup_context, options); end + + # source://actionview//lib/action_view/renderer/object_renderer.rb#19 + def render_object_derive_partial(object, context, block); end + + # source://actionview//lib/action_view/renderer/object_renderer.rb#13 + def render_object_with_partial(object, partial, context, block); end + + private + + # source://actionview//lib/action_view/renderer/object_renderer.rb#29 + def render_partial_template(view, locals, template, layout, block); end + + # source://actionview//lib/action_view/renderer/object_renderer.rb#25 + def template_keys(path); end +end + +# Used as a buffer for views +# +# The main difference between this and ActiveSupport::SafeBuffer +# is for the methods `<<` and `safe_expr_append=` the inputs are +# checked for nil before they are assigned and `to_s` is called on +# the input. For example: +# +# obuf = ActionView::OutputBuffer.new "hello" +# obuf << 5 +# puts obuf # => "hello5" +# +# sbuf = ActiveSupport::SafeBuffer.new "hello" +# sbuf << 5 +# puts sbuf # => "hello\u0005" +# +# source://actionview//lib/action_view/buffers.rb#21 +class ActionView::OutputBuffer < ::ActiveSupport::SafeBuffer + # @return [OutputBuffer] a new instance of OutputBuffer + # + # source://actionview//lib/action_view/buffers.rb#22 + def initialize(*_arg0); end + + # source://actionview//lib/action_view/buffers.rb#27 + def <<(value); end + + # source://actionview//lib/action_view/buffers.rb#27 + def append=(value); end + + # source://activesupport/7.0.4.3/lib/active_support/core_ext/string/output_safety.rb#195 + def safe_append=(value); end + + # source://actionview//lib/action_view/buffers.rb#33 + def safe_expr_append=(val); end +end + +# source://actionview//lib/action_view/flows.rb#6 +class ActionView::OutputFlow + # @return [OutputFlow] a new instance of OutputFlow + # + # source://actionview//lib/action_view/flows.rb#9 + def initialize; end + + # Called by content_for + # + # source://actionview//lib/action_view/flows.rb#24 + def append(key, value); end + + # Called by content_for + # + # source://actionview//lib/action_view/flows.rb#24 + def append!(key, value); end + + # Returns the value of attribute content. + # + # source://actionview//lib/action_view/flows.rb#7 + def content; end + + # Called by _layout_for to read stored values. + # + # source://actionview//lib/action_view/flows.rb#14 + def get(key); end + + # Called by each renderer object to set the layout contents. + # + # source://actionview//lib/action_view/flows.rb#19 + def set(key, value); end +end + +# source://actionview//lib/action_view/renderer/collection_renderer.rb#6 +class ActionView::PartialIteration + # @return [PartialIteration] a new instance of PartialIteration + # + # source://actionview//lib/action_view/renderer/collection_renderer.rb#13 + def initialize(size); end + + # Check if this is the first iteration of the partial. + # + # @return [Boolean] + # + # source://actionview//lib/action_view/renderer/collection_renderer.rb#19 + def first?; end + + # The current iteration of the partial. + # + # source://actionview//lib/action_view/renderer/collection_renderer.rb#11 + def index; end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#28 + def iterate!; end + + # Check if this is the last iteration of the partial. + # + # @return [Boolean] + # + # source://actionview//lib/action_view/renderer/collection_renderer.rb#24 + def last?; end + + # The number of iterations that will be done by the partial. + # + # source://actionview//lib/action_view/renderer/collection_renderer.rb#8 + def size; end +end + +# = Action View Partials +# +# There's also a convenience method for rendering sub templates within the current controller that depends on a +# single object (we call this kind of sub templates for partials). It relies on the fact that partials should +# follow the naming convention of being prefixed with an underscore -- as to separate them from regular +# templates that could be rendered on their own. +# +# In a template for Advertiser#account: +# +# <%= render partial: "account" %> +# +# This would render "advertiser/_account.html.erb". +# +# In another template for Advertiser#buy, we could have: +# +# <%= render partial: "account", locals: { account: @buyer } %> +# +# <% @advertisements.each do |ad| %> +# <%= render partial: "ad", locals: { ad: ad } %> +# <% end %> +# +# This would first render advertiser/_account.html.erb with @buyer passed in as the local variable +account+, then +# render advertiser/_ad.html.erb and pass the local variable +ad+ to the template for display. +# +# == The +:as+ and +:object+ options +# +# By default ActionView::PartialRenderer doesn't have any local variables. +# The :object option can be used to pass an object to the partial. For instance: +# +# <%= render partial: "account", object: @buyer %> +# +# would provide the @buyer object to the partial, available under the local variable +account+ and is +# equivalent to: +# +# <%= render partial: "account", locals: { account: @buyer } %> +# +# With the :as option we can specify a different name for said local variable. For example, if we +# wanted it to be +user+ instead of +account+ we'd do: +# +# <%= render partial: "account", object: @buyer, as: 'user' %> +# +# This is equivalent to +# +# <%= render partial: "account", locals: { user: @buyer } %> +# +# == \Rendering a collection of partials +# +# The example of partial use describes a familiar pattern where a template needs to iterate over an array and +# render a sub template for each of the elements. This pattern has been implemented as a single method that +# accepts an array and renders a partial by the same name as the elements contained within. So the three-lined +# example in "Using partials" can be rewritten with a single line: +# +# <%= render partial: "ad", collection: @advertisements %> +# +# This will render advertiser/_ad.html.erb and pass the local variable +ad+ to the template for display. An +# iteration object will automatically be made available to the template with a name of the form +# +partial_name_iteration+. The iteration object has knowledge about which index the current object has in +# the collection and the total size of the collection. The iteration object also has two convenience methods, +# +first?+ and +last?+. In the case of the example above, the template would be fed +ad_iteration+. +# For backwards compatibility the +partial_name_counter+ is still present and is mapped to the iteration's +# +index+ method. +# +# The :as option may be used when rendering partials. +# +# You can specify a partial to be rendered between elements via the :spacer_template option. +# The following example will render advertiser/_ad_divider.html.erb between each ad partial: +# +# <%= render partial: "ad", collection: @advertisements, spacer_template: "ad_divider" %> +# +# If the given :collection is +nil+ or empty, render will return +nil+. This will allow you +# to specify a text which will be displayed instead by using this form: +# +# <%= render(partial: "ad", collection: @advertisements) || "There's no ad to be displayed" %> +# +# == \Rendering shared partials +# +# Two controllers can share a set of partials and render them like this: +# +# <%= render partial: "advertisement/ad", locals: { ad: @advertisement } %> +# +# This will render the partial advertisement/_ad.html.erb regardless of which controller this is being called from. +# +# == \Rendering objects that respond to +to_partial_path+ +# +# Instead of explicitly naming the location of a partial, you can also let PartialRenderer do the work +# and pick the proper path by checking +to_partial_path+ method. +# +# # @account.to_partial_path returns 'accounts/account', so it can be used to replace: +# # <%= render partial: "accounts/account", locals: { account: @account} %> +# <%= render partial: @account %> +# +# # @posts is an array of Post instances, so every post record returns 'posts/post' on +to_partial_path+, +# # that's why we can replace: +# # <%= render partial: "posts/post", collection: @posts %> +# <%= render partial: @posts %> +# +# == \Rendering the default case +# +# If you're not going to be using any of the options like collections or layouts, you can also use the short-hand +# defaults of render to render partials. Examples: +# +# # Instead of <%= render partial: "account" %> +# <%= render "account" %> +# +# # Instead of <%= render partial: "account", locals: { account: @buyer } %> +# <%= render "account", account: @buyer %> +# +# # @account.to_partial_path returns 'accounts/account', so it can be used to replace: +# # <%= render partial: "accounts/account", locals: { account: @account} %> +# <%= render @account %> +# +# # @posts is an array of Post instances, so every post record returns 'posts/post' on +to_partial_path+, +# # that's why we can replace: +# # <%= render partial: "posts/post", collection: @posts %> +# <%= render @posts %> +# +# == \Rendering partials with layouts +# +# Partials can have their own layouts applied to them. These layouts are different than the ones that are +# specified globally for the entire action, but they work in a similar fashion. Imagine a list with two types +# of users: +# +# <%# app/views/users/index.html.erb %> +# Here's the administrator: +# <%= render partial: "user", layout: "administrator", locals: { user: administrator } %> +# +# Here's the editor: +# <%= render partial: "user", layout: "editor", locals: { user: editor } %> +# +# <%# app/views/users/_user.html.erb %> +# Name: <%= user.name %> +# +# <%# app/views/users/_administrator.html.erb %> +#
    +# Budget: $<%= user.budget %> +# <%= yield %> +#
    +# +# <%# app/views/users/_editor.html.erb %> +#
    +# Deadline: <%= user.deadline %> +# <%= yield %> +#
    +# +# ...this will return: +# +# Here's the administrator: +#
    +# Budget: $<%= user.budget %> +# Name: <%= user.name %> +#
    +# +# Here's the editor: +#
    +# Deadline: <%= user.deadline %> +# Name: <%= user.name %> +#
    +# +# If a collection is given, the layout will be rendered once for each item in +# the collection. For example, these two snippets have the same output: +# +# <%# app/views/users/_user.html.erb %> +# Name: <%= user.name %> +# +# <%# app/views/users/index.html.erb %> +# <%# This does not use layouts %> +#
      +# <% users.each do |user| -%> +#
    • +# <%= render partial: "user", locals: { user: user } %> +#
    • +# <% end -%> +#
    +# +# <%# app/views/users/_li_layout.html.erb %> +#
  • +# <%= yield %> +#
  • +# +# <%# app/views/users/index.html.erb %> +#
      +# <%= render partial: "user", layout: "li_layout", collection: users %> +#
    +# +# Given two users whose names are Alice and Bob, these snippets return: +# +#
      +#
    • +# Name: Alice +#
    • +#
    • +# Name: Bob +#
    • +#
    +# +# The current object being rendered, as well as the object_counter, will be +# available as local variables inside the layout template under the same names +# as available in the partial. +# +# You can also apply a layout to a block within any template: +# +# <%# app/views/users/_chief.html.erb %> +# <%= render(layout: "administrator", locals: { user: chief }) do %> +# Title: <%= chief.title %> +# <% end %> +# +# ...this will return: +# +#
    +# Budget: $<%= user.budget %> +# Title: <%= chief.name %> +#
    +# +# As you can see, the :locals hash is shared between both the partial and its layout. +# +# source://actionview//lib/action_view/renderer/partial_renderer.rb#220 +class ActionView::PartialRenderer < ::ActionView::AbstractRenderer + include ::ActionView::CollectionCaching + + # @return [PartialRenderer] a new instance of PartialRenderer + # + # source://actionview//lib/action_view/renderer/partial_renderer.rb#223 + def initialize(lookup_context, options); end + + # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#12 + def collection_cache; end + + # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#12 + def collection_cache=(val); end + + # source://actionview//lib/action_view/renderer/partial_renderer.rb#230 + def render(partial, context, block); end + + private + + # source://actionview//lib/action_view/renderer/partial_renderer.rb#261 + def find_template(path, locals); end + + # source://actionview//lib/action_view/renderer/partial_renderer.rb#245 + def render_partial_template(view, locals, template, layout, block); end + + # source://actionview//lib/action_view/renderer/partial_renderer.rb#241 + def template_keys(_); end + + class << self + # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#12 + def collection_cache; end + + # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#12 + def collection_cache=(val); end + end +end + +# = Action View PathSet +# +# This class is used to store and access paths in Action View. A number of +# operations are defined so that you can search among the paths in this +# set and also perform operations on other +PathSet+ objects. +# +# A +LookupContext+ will use a +PathSet+ to store the paths in its context. +# +# source://actionview//lib/action_view/path_set.rb#11 +class ActionView::PathSet + include ::Enumerable + + # @return [PathSet] a new instance of PathSet + # + # source://actionview//lib/action_view/path_set.rb#18 + def initialize(paths = T.unsafe(nil)); end + + # source://actionview//lib/action_view/path_set.rb#35 + def +(array); end + + # source://actionview//lib/action_view/path_set.rb#41 + def <<(*args); end + + # source://actionview//lib/action_view/path_set.rb#16 + def [](*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/path_set.rb#31 + def compact; end + + # source://actionview//lib/action_view/path_set.rb#41 + def concat(*args); end + + # source://actionview//lib/action_view/path_set.rb#16 + def each(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/path_set.rb#60 + def exists?(path, prefixes, partial, details, details_key, locals); end + + # source://actionview//lib/action_view/path_set.rb#47 + def find(path, prefixes, partial, details, details_key, locals); end + + # source://actionview//lib/action_view/path_set.rb#52 + def find_all(path, prefixes, partial, details, details_key, locals); end + + # source://actionview//lib/action_view/path_set.rb#16 + def include?(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/path_set.rb#41 + def insert(*args); end + + # Returns the value of attribute paths. + # + # source://actionview//lib/action_view/path_set.rb#14 + def paths; end + + # source://actionview//lib/action_view/path_set.rb#16 + def pop(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/path_set.rb#41 + def push(*args); end + + # source://actionview//lib/action_view/path_set.rb#16 + def size(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/path_set.rb#27 + def to_ary; end + + # source://actionview//lib/action_view/path_set.rb#41 + def unshift(*args); end + + private + + # source://actionview//lib/action_view/path_set.rb#22 + def initialize_copy(other); end + + # source://actionview//lib/action_view/path_set.rb#65 + def search_combinations(prefixes); end + + # source://actionview//lib/action_view/path_set.rb#74 + def typecast(paths); end +end + +# RecordIdentifier encapsulates methods used by various ActionView helpers +# to associate records with DOM elements. +# +# Consider for example the following code that form of post: +# +# <%= form_for(post) do |f| %> +# <%= f.text_field :body %> +# <% end %> +# +# When +post+ is a new, unsaved ActiveRecord::Base instance, the resulting HTML +# is: +# +#
    +# +#
    +# +# When +post+ is a persisted ActiveRecord::Base instance, the resulting HTML +# is: +# +#
    +# +#
    +# +# In both cases, the +id+ and +class+ of the wrapping DOM element are +# automatically generated, following naming conventions encapsulated by the +# RecordIdentifier methods #dom_id and #dom_class: +# +# dom_id(Post.new) # => "new_post" +# dom_class(Post.new) # => "post" +# dom_id(Post.find 42) # => "post_42" +# dom_class(Post.find 42) # => "post" +# +# Note that these methods do not strictly require +Post+ to be a subclass of +# ActiveRecord::Base. +# Any +Post+ class will work as long as its instances respond to +to_key+ +# and +model_name+, given that +model_name+ responds to +param_key+. +# For instance: +# +# class Post +# attr_accessor :to_key +# +# def model_name +# OpenStruct.new param_key: 'post' +# end +# +# def self.find(id) +# new.tap { |post| post.to_key = [id] } +# end +# end +# +# source://actionview//lib/action_view/record_identifier.rb#56 +module ActionView::RecordIdentifier + include ::ActionView::ModelNaming + extend ::ActionView::RecordIdentifier + extend ::ActionView::ModelNaming + + # The DOM class convention is to use the singular form of an object or class. + # + # dom_class(post) # => "post" + # dom_class(Person) # => "person" + # + # If you need to address multiple instances of the same class in the same view, you can prefix the dom_class: + # + # dom_class(post, :edit) # => "edit_post" + # dom_class(Person, :edit) # => "edit_person" + # + # source://actionview//lib/action_view/record_identifier.rb#74 + def dom_class(record_or_class, prefix = T.unsafe(nil)); end + + # The DOM id convention is to use the singular form of an object or class with the id following an underscore. + # If no id is found, prefix with "new_" instead. + # + # dom_id(Post.find(45)) # => "post_45" + # dom_id(Post.new) # => "new_post" + # + # If you need to address multiple instances of the same class in the same view, you can prefix the dom_id: + # + # dom_id(Post.find(45), :edit) # => "edit_post_45" + # dom_id(Post.new, :custom) # => "custom_post" + # + # source://actionview//lib/action_view/record_identifier.rb#89 + def dom_id(record, prefix = T.unsafe(nil)); end + + private + + # Returns a string representation of the key attribute(s) that is suitable for use in an HTML DOM id. + # This can be overwritten to customize the default generated string representation if desired. + # If you need to read back a key from a dom_id in order to query for the underlying database record, + # you should write a helper like 'person_record_from_dom_id' that will extract the key either based + # on the default implementation (which just joins all key attributes with '_') or on your own + # overwritten version of the method. By default, this implementation passes the key string through a + # method that replaces all characters that are invalid inside DOM ids, with valid ones. You need to + # make sure yourself that your dom ids are valid, in case you override this method. + # + # source://actionview//lib/action_view/record_identifier.rb#106 + def record_key_for_dom_id(record); end +end + +# source://actionview//lib/action_view/record_identifier.rb#62 +ActionView::RecordIdentifier::JOIN = T.let(T.unsafe(nil), String) + +# source://actionview//lib/action_view/record_identifier.rb#63 +ActionView::RecordIdentifier::NEW = T.let(T.unsafe(nil), String) + +# source://actionview//lib/action_view/ripper_ast_parser.rb#6 +class ActionView::RenderParser + # @return [RenderParser] a new instance of RenderParser + # + # source://actionview//lib/action_view/render_parser.rb#7 + def initialize(name, code); end + + # source://actionview//lib/action_view/render_parser.rb#13 + def render_calls; end + + private + + # source://actionview//lib/action_view/render_parser.rb#22 + def directory; end + + # source://actionview//lib/action_view/render_parser.rb#184 + def layout_to_virtual_path(layout_path); end + + # Convert + # render("foo", ...) + # into either + # render(template: "foo", ...) + # or + # render(partial: "foo", ...) + # + # source://actionview//lib/action_view/render_parser.rb#40 + def normalize_args(string, options_hash); end + + # source://actionview//lib/action_view/render_parser.rb#72 + def parse_hash(node); end + + # source://actionview//lib/action_view/render_parser.rb#76 + def parse_hash_to_symbols(node); end + + # source://actionview//lib/action_view/render_parser.rb#48 + def parse_render(node); end + + # source://actionview//lib/action_view/render_parser.rb#95 + def parse_render_from_options(options_hash); end + + # source://actionview//lib/action_view/render_parser.rb#155 + def parse_str(node); end + + # source://actionview//lib/action_view/render_parser.rb#159 + def parse_sym(node); end + + # source://actionview//lib/action_view/render_parser.rb#176 + def partial_to_virtual_path(render_type, partial_path); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/render_parser.rb#164 + def render_template_with_layout?(render_type, options_hash); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/render_parser.rb#170 + def render_template_with_spacer?(options_hash); end + + # source://actionview//lib/action_view/render_parser.rb#26 + def resolve_path_directory(path); end +end + +# source://actionview//lib/action_view/render_parser.rb#90 +ActionView::RenderParser::ALL_KNOWN_KEYS = T.let(T.unsafe(nil), Array) + +# source://actionview//lib/action_view/render_parser.rb#92 +ActionView::RenderParser::RENDER_TYPE_KEYS = T.let(T.unsafe(nil), Array) + +# source://actionview//lib/action_view/ripper_ast_parser.rb#7 +module ActionView::RenderParser::RipperASTParser + extend ::ActionView::RenderParser::RipperASTParser + + # source://actionview//lib/action_view/ripper_ast_parser.rb#188 + def parse_render_nodes(code); end +end + +# source://actionview//lib/action_view/ripper_ast_parser.rb#8 +class ActionView::RenderParser::RipperASTParser::Node < ::Array + # @return [Node] a new instance of Node + # + # source://actionview//lib/action_view/ripper_ast_parser.rb#11 + def initialize(type, arr, opts = T.unsafe(nil)); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#35 + def argument_nodes; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/ripper_ast_parser.rb#57 + def call?; end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#65 + def call_method_name; end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#16 + def children; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/ripper_ast_parser.rb#25 + def fcall?; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/ripper_ast_parser.rb#29 + def fcall_named?(name); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/ripper_ast_parser.rb#74 + def hash?; end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#88 + def hash_from_body(body); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#20 + def inspect; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/ripper_ast_parser.rb#45 + def string?; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/ripper_ast_parser.rb#96 + def symbol?; end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#78 + def to_hash; end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#69 + def to_string; end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#100 + def to_symbol; end + + # Returns the value of attribute type. + # + # source://actionview//lib/action_view/ripper_ast_parser.rb#9 + def type; end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#61 + def variable_name; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/ripper_ast_parser.rb#49 + def variable_reference?; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/ripper_ast_parser.rb#53 + def vcall?; end +end + +# source://actionview//lib/action_view/ripper_ast_parser.rb#111 +class ActionView::RenderParser::RipperASTParser::NodeParser < ::Ripper + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_BEGIN(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_CHAR(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_END(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on___end__(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_alias(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_alias_error(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_aref(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_aref_field(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_arg_ambiguous(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_arg_paren(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#123 + def on_args_add(list, item); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#123 + def on_args_add_block(list, item); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#123 + def on_args_add_star(list, item); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_args_forward(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#116 + def on_args_new(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_array(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_aryptn(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_assign(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_assign_error(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_assoc_new(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_assoc_splat(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_assoclist_from_args(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_backref(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_backtick(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_bare_assoc_hash(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_begin(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_binary(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_block_var(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_blockarg(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_bodystmt(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_brace_block(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_break(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_call(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_case(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_class(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_class_name_error(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_comma(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_command(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_command_call(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_comment(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_const(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_const_path_field(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_const_path_ref(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_const_ref(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_cvar(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_def(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_defined(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_defs(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_do_block(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_dot2(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_dot3(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_dyna_symbol(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_else(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_elsif(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_embdoc(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_embdoc_beg(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_embdoc_end(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_embexpr_beg(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_embexpr_end(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_embvar(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_ensure(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_excessed_comma(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_fcall(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_field(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_float(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_fndptn(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_for(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_gvar(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_hash(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_heredoc_beg(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_heredoc_dedent(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_heredoc_end(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_hshptn(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_ident(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_if(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_if_mod(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_ifop(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_ignored_nl(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_ignored_sp(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_imaginary(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_in(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_int(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_ivar(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_kw(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_kwrest_param(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_label(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_label_end(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_lambda(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_lbrace(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_lbracket(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_lparen(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_magic_comment(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_massign(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#123 + def on_method_add_arg(list, item); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#123 + def on_method_add_block(list, item); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#123 + def on_mlhs_add(list, item); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#123 + def on_mlhs_add_post(list, item); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#123 + def on_mlhs_add_star(list, item); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#116 + def on_mlhs_new(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_mlhs_paren(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_module(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#123 + def on_mrhs_add(list, item); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#123 + def on_mrhs_add_star(list, item); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#116 + def on_mrhs_new(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_mrhs_new_from_args(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_next(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_nl(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_nokw_param(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_op(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_opassign(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_operator_ambiguous(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_param_error(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_params(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_paren(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_parse_error(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_period(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_program(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#123 + def on_qsymbols_add(list, item); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_qsymbols_beg(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#116 + def on_qsymbols_new(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#123 + def on_qwords_add(list, item); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_qwords_beg(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#116 + def on_qwords_new(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_rational(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_rbrace(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_rbracket(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_redo(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#123 + def on_regexp_add(list, item); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_regexp_beg(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_regexp_end(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_regexp_literal(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#116 + def on_regexp_new(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_rescue(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_rescue_mod(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_rest_param(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_retry(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_return(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_return0(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_rparen(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_sclass(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_semicolon(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_sp(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#123 + def on_stmts_add(list, item); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#116 + def on_stmts_new(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#123 + def on_string_add(list, item); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_string_concat(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_string_content(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_string_dvar(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_string_embexpr(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_string_literal(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_super(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_symbeg(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_symbol(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_symbol_literal(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#123 + def on_symbols_add(list, item); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_symbols_beg(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#116 + def on_symbols_new(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_tlambda(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_tlambeg(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_top_const_field(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_top_const_ref(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_tstring_beg(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_tstring_content(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_tstring_end(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_unary(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_undef(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_unless(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_unless_mod(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_until(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_until_mod(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_var_alias(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_var_field(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_var_ref(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_vcall(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_void_stmt(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_when(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_while(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_while_mod(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#123 + def on_word_add(list, item); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#116 + def on_word_new(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#123 + def on_words_add(list, item); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_words_beg(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#116 + def on_words_new(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#140 + def on_words_sep(tok); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#123 + def on_xstring_add(list, item); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_xstring_literal(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#116 + def on_xstring_new(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_yield(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_yield0(*args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#131 + def on_zsuper(*args); end +end + +# source://actionview//lib/action_view/ripper_ast_parser.rb#147 +class ActionView::RenderParser::RipperASTParser::RenderCallExtractor < ::ActionView::RenderParser::RipperASTParser::NodeParser + # @return [RenderCallExtractor] a new instance of RenderCallExtractor + # + # source://actionview//lib/action_view/ripper_ast_parser.rb#152 + def initialize(*args); end + + # Returns the value of attribute render_calls. + # + # source://actionview//lib/action_view/ripper_ast_parser.rb#148 + def render_calls; end + + private + + # source://actionview//lib/action_view/ripper_ast_parser.rb#177 + def on_arg_paren(content); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#163 + def on_command(name, *args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#159 + def on_fcall(name, *args); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#181 + def on_paren(content); end + + # source://actionview//lib/action_view/ripper_ast_parser.rb#167 + def on_render_call(node); end +end + +# source://actionview//lib/action_view/ripper_ast_parser.rb#150 +ActionView::RenderParser::RipperASTParser::RenderCallExtractor::METHODS_TO_PARSE = T.let(T.unsafe(nil), Array) + +# This is the main entry point for rendering. It basically delegates +# to other objects like TemplateRenderer and PartialRenderer which +# actually renders the template. +# +# The Renderer will parse the options from the +render+ or +render_body+ +# method and render a partial or a template based on the options. The +# +TemplateRenderer+ and +PartialRenderer+ objects are wrappers which do all +# the setup and logic necessary to render a view and a new object is created +# each time +render+ is called. +# +# source://actionview//lib/action_view/renderer/renderer.rb#13 +class ActionView::Renderer + # @return [Renderer] a new instance of Renderer + # + # source://actionview//lib/action_view/renderer/renderer.rb#16 + def initialize(lookup_context); end + + # source://actionview//lib/action_view/renderer/renderer.rb#56 + def cache_hits; end + + # Returns the value of attribute lookup_context. + # + # source://actionview//lib/action_view/renderer/renderer.rb#14 + def lookup_context; end + + # Sets the attribute lookup_context + # + # @param value the value to set the attribute lookup_context to. + # + # source://actionview//lib/action_view/renderer/renderer.rb#14 + def lookup_context=(_arg0); end + + # Main render entry point shared by Action View and Action Controller. + # + # source://actionview//lib/action_view/renderer/renderer.rb#21 + def render(context, options); end + + # Render but returns a valid Rack body. If fibers are defined, we return + # a streaming body that renders the template piece by piece. + # + # Note that partials are not supported to be rendered with streaming, + # so in such cases, we just wrap them in an array. + # + # source://actionview//lib/action_view/renderer/renderer.rb#38 + def render_body(context, options); end + + # Direct access to partial rendering. + # + # source://actionview//lib/action_view/renderer/renderer.rb#52 + def render_partial(context, options, &block); end + + # source://actionview//lib/action_view/renderer/renderer.rb#64 + def render_partial_to_object(context, options, &block); end + + # Direct access to template rendering. + # + # source://actionview//lib/action_view/renderer/renderer.rb#47 + def render_template(context, options); end + + # source://actionview//lib/action_view/renderer/renderer.rb#60 + def render_template_to_object(context, options); end + + # source://actionview//lib/action_view/renderer/renderer.rb#25 + def render_to_object(context, options); end + + private + + # source://actionview//lib/action_view/renderer/renderer.rb#107 + def collection_from_object(object); end + + # source://actionview//lib/action_view/renderer/renderer.rb#100 + def collection_from_options(options); end +end + +# source://actionview//lib/action_view/rendering.rb#25 +module ActionView::Rendering + extend ::ActiveSupport::Concern + include ::ActionView::ViewPaths + + mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods + mixes_in_class_methods ::ActionView::Rendering::ClassMethods + + # source://actionview//lib/action_view/rendering.rb#31 + def initialize; end + + # Override process to set up I18n proxy. + # + # source://actionview//lib/action_view/rendering.rb#37 + def process(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/rendering.rb#101 + def render_to_body(options = T.unsafe(nil)); end + + # Returns the value of attribute rendered_format. + # + # source://actionview//lib/action_view/rendering.rb#29 + def rendered_format; end + + # An instance of a view class. The default view class is ActionView::Base. + # + # The view class must have the following methods: + # + # * View.new(lookup_context, assigns, controller) — Create a new + # ActionView instance for a controller and we can also pass the arguments. + # + # * View#render(option) — Returns String with the rendered template. + # + # Override this method in a module to change the default behavior. + # + # source://actionview//lib/action_view/rendering.rb#91 + def view_context; end + + # source://actionview//lib/action_view/rendering.rb#77 + def view_context_class; end + + # Returns an object that is able to render templates. + # + # source://actionview//lib/action_view/rendering.rb#96 + def view_renderer; end + + private + + # Normalize args by converting render "foo" to render :action => "foo" and + # render "foo/bar" to render :template => "foo/bar". + # + # source://actionview//lib/action_view/rendering.rb#134 + def _normalize_args(action = T.unsafe(nil), options = T.unsafe(nil)); end + + # Normalize options. + # + # source://actionview//lib/action_view/rendering.rb#158 + def _normalize_options(options); end + + # Assign the rendered format to look up context. + # + # source://actionview//lib/action_view/rendering.rb#127 + def _process_format(format); end + + # Find and render a template based on the options given. + # + # source://actionview//lib/action_view/rendering.rb#108 + def _render_template(options); end +end + +# source://actionview//lib/action_view/rendering.rb#44 +module ActionView::Rendering::ClassMethods + # source://actionview//lib/action_view/rendering.rb#48 + def _helpers; end + + # source://actionview//lib/action_view/rendering.rb#45 + def _routes; end + + # source://actionview//lib/action_view/rendering.rb#51 + def build_view_context_class(klass, supports_path, routes, helpers); end + + # source://actionview//lib/action_view/rendering.rb#64 + def view_context_class; end +end + +# = Action View Resolver +# +# source://actionview//lib/action_view/template/resolver.rb#12 +class ActionView::Resolver + # source://actionview//lib/action_view/template/resolver.rb#66 + def all_template_paths; end + + # source://actionview//lib/action_view/template/resolver.rb#52 + def caching; end + + # source://actionview//lib/action_view/template/resolver.rb#52 + def caching=(val); end + + # source://actionview//lib/action_view/template/resolver.rb#76 + def caching?(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/template/resolver.rb#58 + def clear_cache; end + + # Normalizes the arguments and passes it on to find_templates. + # + # source://actionview//lib/action_view/template/resolver.rb#62 + def find_all(name, prefix = T.unsafe(nil), partial = T.unsafe(nil), details = T.unsafe(nil), key = T.unsafe(nil), locals = T.unsafe(nil)); end + + private + + # source://actionview//lib/action_view/template/resolver.rb#72 + def _find_all(name, prefix, partial, details, key, locals); end + + # This is what child classes implement. No defaults are needed + # because Resolver guarantees that the arguments are present and + # normalized. + # + # @raise [NotImplementedError] + # + # source://actionview//lib/action_view/template/resolver.rb#81 + def find_templates(name, prefix, partial, details, locals = T.unsafe(nil)); end + + class << self + # source://actionview//lib/action_view/template/resolver.rb#52 + def caching; end + + # source://actionview//lib/action_view/template/resolver.rb#52 + def caching=(val); end + + # source://actionview//lib/action_view/template/resolver.rb#52 + def caching?; end + end +end + +# source://actionview//lib/action_view/template/resolver.rb#13 +ActionView::Resolver::Path = ActionView::TemplatePath + +# source://actionview//lib/action_view/template/resolver.rb#16 +class ActionView::Resolver::PathParser + # source://actionview//lib/action_view/template/resolver.rb#19 + def build_path_regex; end + + # source://actionview//lib/action_view/template/resolver.rb#38 + def parse(path); end +end + +# source://actionview//lib/action_view/template/resolver.rb#17 +class ActionView::Resolver::PathParser::ParsedPath < ::Struct + # Returns the value of attribute details + # + # @return [Object] the current value of details + def details; end + + # Sets the attribute details + # + # @param value [Object] the value to set the attribute details to. + # @return [Object] the newly set value + def details=(_); end + + # Returns the value of attribute path + # + # @return [Object] the current value of path + def path; end + + # Sets the attribute path + # + # @param value [Object] the value to set the attribute path to. + # @return [Object] the newly set value + def path=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://actionview//lib/action_view/routing_url_for.rb#6 +module ActionView::RoutingUrlFor + # Returns the URL for the set of +options+ provided. This takes the + # same options as +url_for+ in Action Controller (see the + # documentation for ActionController::Base#url_for). Note that by default + # :only_path is true so you'll get the relative "/controller/action" + # instead of the fully qualified URL like "http://example.com/controller/action". + # + # ==== Options + # * :anchor - Specifies the anchor name to be appended to the path. + # * :only_path - If true, returns the relative URL (omitting the protocol, host name, and port) (true by default unless :host is specified). + # * :trailing_slash - If true, adds a trailing slash, as in "/archive/2005/". Note that this + # is currently not recommended since it breaks caching. + # * :host - Overrides the default (current) host if provided. + # * :protocol - Overrides the default (current) protocol if provided. + # * :user - Inline HTTP authentication (only plucked out if :password is also present). + # * :password - Inline HTTP authentication (only plucked out if :user is also present). + # + # ==== Relying on named routes + # + # Passing a record (like an Active Record) instead of a hash as the options parameter will + # trigger the named route for that record. The lookup will happen on the name of the class. So passing a + # Workshop object will attempt to use the +workshop_path+ route. If you have a nested route, such as + # +admin_workshop_path+ you'll have to call that explicitly (it's impossible for +url_for+ to guess that route). + # + # ==== Implicit Controller Namespacing + # + # Controllers passed in using the +:controller+ option will retain their namespace unless it is an absolute one. + # + # ==== Examples + # <%= url_for(action: 'index') %> + # # => /blogs/ + # + # <%= url_for(action: 'find', controller: 'books') %> + # # => /books/find + # + # <%= url_for(action: 'login', controller: 'members', only_path: false, protocol: 'https') %> + # # => https://www.example.com/members/login/ + # + # <%= url_for(action: 'play', anchor: 'player') %> + # # => /messages/play/#player + # + # <%= url_for(action: 'jump', anchor: 'tax&ship') %> + # # => /testing/jump/#tax&ship + # + # <%= url_for(Workshop) %> + # # => /workshops + # + # <%= url_for(Workshop.new) %> + # # relies on Workshop answering a persisted? call (and in this case returning false) + # # => /workshops + # + # <%= url_for(@workshop) %> + # # calls @workshop.to_param which by default returns the id + # # => /workshops/5 + # + # # to_param can be re-defined in a model to provide different URL names: + # # => /workshops/1-workshop-name + # + # <%= url_for("http://www.example.com") %> + # # => http://www.example.com + # + # <%= url_for(:back) %> + # # if request.env["HTTP_REFERER"] is set to "http://www.example.com" + # # => http://www.example.com + # + # <%= url_for(:back) %> + # # if request.env["HTTP_REFERER"] is not set or is blank + # # => javascript:history.back() + # + # <%= url_for(action: 'index', controller: 'users') %> + # # Assuming an "admin" namespace + # # => /admin/users + # + # <%= url_for(action: 'index', controller: '/users') %> + # # Specify absolute path with beginning slash + # # => /users + # + # source://actionview//lib/action_view/routing_url_for.rb#82 + def url_for(options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/routing_url_for.rb#124 + def url_options; end + + private + + # source://actionview//lib/action_view/routing_url_for.rb#139 + def _generate_paths_by_default; end + + # source://actionview//lib/action_view/routing_url_for.rb#130 + def _routes_context; end + + # source://actionview//lib/action_view/routing_url_for.rb#143 + def ensure_only_path_option(options); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/routing_url_for.rb#134 + def optimize_routes_generation?; end +end + +# source://actionview//lib/action_view/buffers.rb#41 +class ActionView::StreamingBuffer + # @return [StreamingBuffer] a new instance of StreamingBuffer + # + # source://actionview//lib/action_view/buffers.rb#42 + def initialize(block); end + + # source://actionview//lib/action_view/buffers.rb#46 + def <<(value); end + + # source://actionview//lib/action_view/buffers.rb#46 + def append=(value); end + + # source://actionview//lib/action_view/buffers.rb#46 + def concat(value); end + + # source://actionview//lib/action_view/buffers.rb#63 + def html_safe; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/buffers.rb#59 + def html_safe?; end + + # source://actionview//lib/action_view/buffers.rb#54 + def safe_append=(value); end + + # source://actionview//lib/action_view/buffers.rb#54 + def safe_concat(value); end +end + +# source://actionview//lib/action_view/flows.rb#30 +class ActionView::StreamingFlow < ::ActionView::OutputFlow + # @return [StreamingFlow] a new instance of StreamingFlow + # + # source://actionview//lib/action_view/flows.rb#31 + def initialize(view, fiber); end + + # Appends the contents for the given key. This is called + # by providing and resuming back to the fiber, + # if that's the key it's waiting for. + # + # source://actionview//lib/action_view/flows.rb#65 + def append!(key, value); end + + # Try to get stored content. If the content + # is not available and we're inside the layout fiber, + # then it will begin waiting for the given key and yield. + # + # source://actionview//lib/action_view/flows.rb#43 + def get(key); end + + private + + # @return [Boolean] + # + # source://actionview//lib/action_view/flows.rb#71 + def inside_fiber?; end +end + +# == TODO +# +# * Support streaming from child templates, partials and so on. +# * Rack::Cache needs to support streaming bodies +# +# source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#13 +class ActionView::StreamingTemplateRenderer < ::ActionView::TemplateRenderer + # For streaming, instead of rendering a given a template, we return a Body + # object that responds to each. This object is initialized with a block + # that knows how to render the template. + # + # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#45 + def render_template(view, template, layout_name = T.unsafe(nil), locals = T.unsafe(nil)); end + + private + + # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#57 + def delayed_render(buffer, template, layout, view, locals); end +end + +# A valid Rack::Body (i.e. it responds to each). +# It is initialized with a block that, when called, starts +# rendering the template. +# +# source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#14 +class ActionView::StreamingTemplateRenderer::Body + # @return [Body] a new instance of Body + # + # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#15 + def initialize(&start); end + + # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#19 + def each(&block); end + + private + + # This is the same logging logic as in ShowExceptions middleware. + # + # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#31 + def log_error(exception); end +end + +# source://actionview//lib/action_view/template/error.rb#232 +class ActionView::SyntaxErrorInTemplate < ::ActionView::Template::Error + # @return [SyntaxErrorInTemplate] a new instance of SyntaxErrorInTemplate + # + # source://actionview//lib/action_view/template/error.rb#233 + def initialize(template, offending_code_string); end + + # source://actionview//lib/action_view/template/error.rb#244 + def annotated_source_code; end + + # source://actionview//lib/action_view/template/error.rb#238 + def message; end +end + +# = Action View Template +# +# source://actionview//lib/action_view/template.rb#8 +class ActionView::Template + extend ::ActiveSupport::Autoload + extend ::ActionView::Template::Handlers + + # @return [Template] a new instance of Template + # + # source://actionview//lib/action_view/template.rb#123 + def initialize(source, identifier, handler, locals:, format: T.unsafe(nil), variant: T.unsafe(nil), virtual_path: T.unsafe(nil)); end + + # This method is responsible for properly setting the encoding of the + # source. Until this point, we assume that the source is BINARY data. + # If no additional information is supplied, we assume the encoding is + # the same as Encoding.default_external. + # + # The user can also specify the encoding via a comment on the first + # with any template engine, as we process out the encoding comment + # before passing the source on to the template engine, leaving a + # blank line in its stead. + # + # source://actionview//lib/action_view/template.rb#189 + def encode!; end + + # Returns the value of attribute format. + # + # source://actionview//lib/action_view/template.rb#121 + def format; end + + # Returns the value of attribute handler. + # + # source://actionview//lib/action_view/template.rb#120 + def handler; end + + # Returns the value of attribute identifier. + # + # source://actionview//lib/action_view/template.rb#120 + def identifier; end + + # source://actionview//lib/action_view/template.rb#171 + def inspect; end + + # Returns the value of attribute locals. + # + # source://actionview//lib/action_view/template.rb#121 + def locals; end + + # Exceptions are marshalled when using the parallel test runner with DRb, so we need + # to ensure that references to the template object can be marshalled as well. This means forgoing + # the marshalling of the compiler mutex and instantiating that again on unmarshalling. + # + # source://actionview//lib/action_view/template.rb#229 + def marshal_dump; end + + # source://actionview//lib/action_view/template.rb#233 + def marshal_load(array); end + + # Render a template. If the template was not compiled yet, it is done + # exactly before rendering. + # + # This method is instrumented as "!render_template.action_view". Notice that + # we use a bang in this instrumentation because you don't want to + # consume this in production. This is only slow if it's being listened to. + # + # source://actionview//lib/action_view/template.rb#154 + def render(view, locals, buffer = T.unsafe(nil), add_to_stack: T.unsafe(nil), &block); end + + # source://actionview//lib/action_view/template.rb#167 + def short_identifier; end + + # source://actionview//lib/action_view/template.rb#175 + def source; end + + # Returns whether the underlying handler supports streaming. If so, + # a streaming buffer *may* be passed when it starts rendering. + # + # @return [Boolean] + # + # source://actionview//lib/action_view/template.rb#144 + def supports_streaming?; end + + # source://actionview//lib/action_view/template.rb#163 + def type; end + + # Returns the value of attribute variable. + # + # source://actionview//lib/action_view/template.rb#121 + def variable; end + + # Returns the value of attribute variant. + # + # source://actionview//lib/action_view/template.rb#121 + def variant; end + + # Returns the value of attribute virtual_path. + # + # source://actionview//lib/action_view/template.rb#121 + def virtual_path; end + + private + + # Among other things, this method is responsible for properly setting + # the encoding of the compiled template. + # + # If the template engine handles encodings, we send the encoded + # String to the engine without further processing. This allows + # the template engine to support additional mechanisms for + # + # Otherwise, after we figure out the correct encoding, we then + # encode the source into Encoding.default_internal. + # In general, this means that templates will be UTF-8 inside of Rails, + # regardless of the original source encoding. + # + # source://actionview//lib/action_view/template.rb#275 + def compile(mod); end + + # Compile a template. This method ensures a template is compiled + # just once and removes the source after it is compiled. + # + # source://actionview//lib/action_view/template.rb#241 + def compile!(view); end + + # source://actionview//lib/action_view/template.rb#316 + def handle_render_error(view, e); end + + # source://actionview//lib/action_view/template.rb#352 + def identifier_method_name; end + + # source://actionview//lib/action_view/template.rb#356 + def instrument(action, &block); end + + # source://actionview//lib/action_view/template.rb#364 + def instrument_payload; end + + # source://actionview//lib/action_view/template.rb#360 + def instrument_render_template(&block); end + + # source://actionview//lib/action_view/template.rb#325 + def locals_code; end + + # source://actionview//lib/action_view/template.rb#344 + def method_name; end + + class << self + # source://actionview//lib/action_view/template.rb#117 + def frozen_string_literal; end + + # source://actionview//lib/action_view/template.rb#117 + def frozen_string_literal=(_arg0); end + end +end + +# The Template::Error exception is raised when the compilation or rendering of the template +# fails. This exception then gathers a bunch of intimate details and uses it to report a +# precise exception message. +# +# source://actionview//lib/action_view/template/error.rb#153 +class ActionView::Template::Error < ::ActionView::ActionViewError + # @return [Error] a new instance of Error + # + # source://actionview//lib/action_view/template/error.rb#159 + def initialize(template); end + + # source://actionview//lib/action_view/template/error.rb#207 + def annotated_source_code; end + + # Override to prevent #cause resetting during re-raise. + # + # source://actionview//lib/action_view/template/error.rb#157 + def cause; end + + # source://actionview//lib/action_view/template/error.rb#166 + def file_name; end + + # source://actionview//lib/action_view/template/error.rb#199 + def line_number; end + + # source://actionview//lib/action_view/template/error.rb#179 + def source_extract(indentation = T.unsafe(nil)); end + + # source://actionview//lib/action_view/template/error.rb#170 + def sub_template_message; end + + # source://actionview//lib/action_view/template/error.rb#194 + def sub_template_of(template_path); end + + private + + # source://actionview//lib/action_view/template/error.rb#220 + def formatted_code_for(source_code, line_counter, indent); end + + # source://actionview//lib/action_view/template/error.rb#212 + def source_location; end +end + +# source://actionview//lib/action_view/template/error.rb#154 +ActionView::Template::Error::SOURCE_CODE_RADIUS = T.let(T.unsafe(nil), Integer) + +# source://actionview//lib/action_view/template/html.rb#6 +class ActionView::Template::HTML + # @return [HTML] a new instance of HTML + # + # source://actionview//lib/action_view/template/html.rb#9 + def initialize(string, type); end + + # source://actionview//lib/action_view/template/html.rb#28 + def format; end + + # source://actionview//lib/action_view/template/html.rb#14 + def identifier; end + + # source://actionview//lib/action_view/template/html.rb#14 + def inspect; end + + # source://actionview//lib/action_view/template/html.rb#24 + def render(*args); end + + # source://actionview//lib/action_view/template/html.rb#20 + def to_str; end + + # source://actionview//lib/action_view/template/html.rb#7 + def type; end +end + +# source://actionview//lib/action_view/template/handlers.rb#6 +module ActionView::Template::Handlers + # source://actionview//lib/action_view/template/handlers.rb#61 + def handler_for_extension(extension); end + + # source://actionview//lib/action_view/template/handlers.rb#56 + def register_default_template_handler(extension, klass); end + + # Register an object that knows how to handle template files with the given + # extensions. This can be used to implement new template types. + # The handler must respond to +:call+, which will be passed the template + # and should return the rendered template as a String. + # + # @raise [ArgumentError] + # + # source://actionview//lib/action_view/template/handlers.rb#31 + def register_template_handler(*extensions, handler); end + + # source://actionview//lib/action_view/template/handlers.rb#52 + def registered_template_handler(extension); end + + # source://actionview//lib/action_view/template/handlers.rb#48 + def template_handler_extensions; end + + # Opposite to register_template_handler. + # + # source://actionview//lib/action_view/template/handlers.rb#40 + def unregister_template_handler(*extensions); end + + class << self + # @private + # + # source://actionview//lib/action_view/template/handlers.rb#12 + def extended(base); end + + # source://actionview//lib/action_view/template/handlers.rb#23 + def extensions; end + end +end + +# source://actionview//lib/action_view/template/handlers/builder.rb#5 +class ActionView::Template::Handlers::Builder + # source://actionview//lib/action_view/template/handlers/builder.rb#8 + def call(template, source); end + + # source://actionview//lib/action_view/template/handlers/builder.rb#6 + def default_format; end + + # source://actionview//lib/action_view/template/handlers/builder.rb#6 + def default_format=(_arg0); end + + # source://actionview//lib/action_view/template/handlers/builder.rb#6 + def default_format?; end + + private + + # source://actionview//lib/action_view/template/handlers/builder.rb#17 + def require_engine; end + + class << self + # source://actionview//lib/action_view/template/handlers/builder.rb#6 + def default_format; end + + # source://actionview//lib/action_view/template/handlers/builder.rb#6 + def default_format=(value); end + + # source://actionview//lib/action_view/template/handlers/builder.rb#6 + def default_format?; end + end +end + +# source://actionview//lib/action_view/template/handlers/erb.rb#6 +class ActionView::Template::Handlers::ERB + # source://actionview//lib/action_view/template/handlers/erb.rb#36 + def call(template, source); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#14 + def erb_implementation; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#14 + def erb_implementation=(_arg0); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#14 + def erb_implementation?; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#11 + def erb_trim_mode; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#11 + def erb_trim_mode=(_arg0); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#11 + def erb_trim_mode?; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#17 + def escape_ignore_list; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#17 + def escape_ignore_list=(_arg0); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#17 + def escape_ignore_list?; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template/handlers/erb.rb#32 + def handles_encoding?; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#20 + def strip_trailing_newlines; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#20 + def strip_trailing_newlines=(_arg0); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#20 + def strip_trailing_newlines?; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template/handlers/erb.rb#28 + def supports_streaming?; end + + private + + # @raise [WrongEncodingError] + # + # source://actionview//lib/action_view/template/handlers/erb.rb#68 + def valid_encoding(string, encoding); end + + class << self + # source://actionview//lib/action_view/template/handlers/erb.rb#24 + def call(template, source); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#14 + def erb_implementation; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#14 + def erb_implementation=(value); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#14 + def erb_implementation?; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#11 + def erb_trim_mode; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#11 + def erb_trim_mode=(value); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#11 + def erb_trim_mode?; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#17 + def escape_ignore_list; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#17 + def escape_ignore_list=(value); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#17 + def escape_ignore_list?; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#20 + def strip_trailing_newlines; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#20 + def strip_trailing_newlines=(value); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#20 + def strip_trailing_newlines?; end + end +end + +# source://actionview//lib/action_view/template/handlers/erb.rb#22 +ActionView::Template::Handlers::ERB::ENCODING_TAG = T.let(T.unsafe(nil), Regexp) + +# source://actionview//lib/action_view/template/handlers/erb/erubi.rb#10 +class ActionView::Template::Handlers::ERB::Erubi < ::Erubi::Engine + # @return [Erubi] a new instance of Erubi + # + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#11 + def initialize(input, properties = T.unsafe(nil)); end + + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#26 + def evaluate(action_view_erb_handler_context); end + + private + + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#69 + def add_code(code); end + + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#53 + def add_expression(indicator, code); end + + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#74 + def add_postamble(_); end + + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#36 + def add_text(text); end + + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#79 + def flush_newline_if_pending(src); end +end + +# source://actionview//lib/action_view/template/handlers/erb/erubi.rb#51 +ActionView::Template::Handlers::ERB::Erubi::BLOCK_EXPR = T.let(T.unsafe(nil), Regexp) + +# source://actionview//lib/action_view/template/handlers/html.rb#5 +class ActionView::Template::Handlers::Html < ::ActionView::Template::Handlers::Raw + # source://actionview//lib/action_view/template/handlers/html.rb#6 + def call(template, source); end +end + +# source://actionview//lib/action_view/template/handlers/raw.rb#5 +class ActionView::Template::Handlers::Raw + # source://actionview//lib/action_view/template/handlers/raw.rb#6 + def call(template, source); end +end + +# source://actionview//lib/action_view/template/inline.rb#7 +class ActionView::Template::Inline < ::ActionView::Template + # source://actionview//lib/action_view/template/inline.rb#16 + def compile(mod); end +end + +# This finalizer is needed (and exactly with a proc inside another proc) +# otherwise templates leak in development. +# +# source://actionview//lib/action_view/template/inline.rb#8 +ActionView::Template::Inline::Finalizer = T.let(T.unsafe(nil), Proc) + +# source://actionview//lib/action_view/template/raw_file.rb#6 +class ActionView::Template::RawFile + # @return [RawFile] a new instance of RawFile + # + # source://actionview//lib/action_view/template/raw_file.rb#9 + def initialize(filename); end + + # source://actionview//lib/action_view/template/raw_file.rb#7 + def format; end + + # source://actionview//lib/action_view/template/raw_file.rb#7 + def format=(_arg0); end + + # source://actionview//lib/action_view/template/raw_file.rb#16 + def identifier; end + + # source://actionview//lib/action_view/template/raw_file.rb#20 + def render(*args); end + + # source://actionview//lib/action_view/template/raw_file.rb#7 + def type; end + + # source://actionview//lib/action_view/template/raw_file.rb#7 + def type=(_arg0); end +end + +# source://actionview//lib/action_view/template/renderable.rb#6 +class ActionView::Template::Renderable + # @return [Renderable] a new instance of Renderable + # + # source://actionview//lib/action_view/template/renderable.rb#7 + def initialize(renderable); end + + # source://actionview//lib/action_view/template/renderable.rb#19 + def format; end + + # source://actionview//lib/action_view/template/renderable.rb#11 + def identifier; end + + # source://actionview//lib/action_view/template/renderable.rb#15 + def render(context, *args); end +end + +# source://actionview//lib/action_view/template/sources.rb#5 +module ActionView::Template::Sources + extend ::ActiveSupport::Autoload +end + +# source://actionview//lib/action_view/template/sources/file.rb#6 +class ActionView::Template::Sources::File + # @return [File] a new instance of File + # + # source://actionview//lib/action_view/template/sources/file.rb#7 + def initialize(filename); end + + # source://actionview//lib/action_view/template/sources/file.rb#11 + def to_s; end +end + +# source://actionview//lib/action_view/template/text.rb#6 +class ActionView::Template::Text + # @return [Text] a new instance of Text + # + # source://actionview//lib/action_view/template/text.rb#9 + def initialize(string); end + + # source://actionview//lib/action_view/template/text.rb#27 + def format; end + + # source://actionview//lib/action_view/template/text.rb#13 + def identifier; end + + # source://actionview//lib/action_view/template/text.rb#13 + def inspect; end + + # source://actionview//lib/action_view/template/text.rb#23 + def render(*args); end + + # source://actionview//lib/action_view/template/text.rb#19 + def to_str; end + + # source://actionview//lib/action_view/template/text.rb#7 + def type; end + + # source://actionview//lib/action_view/template/text.rb#7 + def type=(_arg0); end +end + +# source://actionview//lib/action_view/template/types.rb#7 +module ActionView::Template::Types + class << self + # source://actionview//lib/action_view/template/types.rb#47 + def [](type); end + + # source://actionview//lib/action_view/template/types.rb#43 + def delegate_to(klass); end + + # source://actionview//lib/action_view/template/types.rb#51 + def symbols; end + + # Returns the value of attribute type_klass. + # + # source://actionview//lib/action_view/template/types.rb#41 + def type_klass; end + + # Sets the attribute type_klass + # + # @param value the value to set the attribute type_klass to. + # + # source://actionview//lib/action_view/template/types.rb#41 + def type_klass=(_arg0); end + end +end + +# source://actionview//lib/action_view/template/types.rb#8 +class ActionView::Template::Types::Type + # @return [Type] a new instance of Type + # + # source://actionview//lib/action_view/template/types.rb#21 + def initialize(symbol); end + + # source://actionview//lib/action_view/template/types.rb#35 + def ==(type); end + + # source://actionview//lib/action_view/template/types.rb#30 + def ref; end + + # Returns the value of attribute symbol. + # + # source://actionview//lib/action_view/template/types.rb#19 + def symbol; end + + # source://actionview//lib/action_view/template/types.rb#25 + def to_s; end + + # source://actionview//lib/action_view/template/types.rb#25 + def to_str; end + + # source://actionview//lib/action_view/template/types.rb#30 + def to_sym; end + + class << self + # source://actionview//lib/action_view/template/types.rb#11 + def [](type); end + end +end + +# source://actionview//lib/action_view/template/types.rb#9 +ActionView::Template::Types::Type::SET = T.let(T.unsafe(nil), T.untyped) + +# source://actionview//lib/action_view/template_details.rb#4 +class ActionView::TemplateDetails + # @return [TemplateDetails] a new instance of TemplateDetails + # + # source://actionview//lib/action_view/template_details.rb#35 + def initialize(locale, handler, format, variant); end + + # Returns the value of attribute format. + # + # source://actionview//lib/action_view/template_details.rb#33 + def format; end + + # source://actionview//lib/action_view/template_details.rb#62 + def format_or_default; end + + # Returns the value of attribute handler. + # + # source://actionview//lib/action_view/template_details.rb#33 + def handler; end + + # source://actionview//lib/action_view/template_details.rb#58 + def handler_class; end + + # Returns the value of attribute locale. + # + # source://actionview//lib/action_view/template_details.rb#33 + def locale; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template_details.rb#42 + def matches?(requested); end + + # source://actionview//lib/action_view/template_details.rb#49 + def sort_key_for(requested); end + + # Returns the value of attribute variant. + # + # source://actionview//lib/action_view/template_details.rb#33 + def variant; end +end + +# source://actionview//lib/action_view/template_details.rb#5 +class ActionView::TemplateDetails::Requested + # @return [Requested] a new instance of Requested + # + # source://actionview//lib/action_view/template_details.rb#11 + def initialize(locale:, handlers:, formats:, variants:); end + + # Returns the value of attribute formats. + # + # source://actionview//lib/action_view/template_details.rb#6 + def formats; end + + # Returns the value of attribute formats_idx. + # + # source://actionview//lib/action_view/template_details.rb#7 + def formats_idx; end + + # Returns the value of attribute handlers. + # + # source://actionview//lib/action_view/template_details.rb#6 + def handlers; end + + # Returns the value of attribute handlers_idx. + # + # source://actionview//lib/action_view/template_details.rb#7 + def handlers_idx; end + + # Returns the value of attribute locale. + # + # source://actionview//lib/action_view/template_details.rb#6 + def locale; end + + # Returns the value of attribute locale_idx. + # + # source://actionview//lib/action_view/template_details.rb#7 + def locale_idx; end + + # Returns the value of attribute variants. + # + # source://actionview//lib/action_view/template_details.rb#6 + def variants; end + + # Returns the value of attribute variants_idx. + # + # source://actionview//lib/action_view/template_details.rb#7 + def variants_idx; end + + private + + # source://actionview//lib/action_view/template_details.rb#28 + def build_idx_hash(arr); end +end + +# source://actionview//lib/action_view/template_details.rb#9 +ActionView::TemplateDetails::Requested::ANY_HASH = T.let(T.unsafe(nil), Hash) + +# source://actionview//lib/action_view/template/error.rb#230 +ActionView::TemplateError = ActionView::Template::Error + +# Represents a template path within ActionView's lookup and rendering system, +# like "users/show" +# +# TemplatePath makes it convenient to convert between separate name, prefix, +# partial arguments and the virtual path. +# +# source://actionview//lib/action_view/template_path.rb#9 +class ActionView::TemplatePath + # @return [TemplatePath] a new instance of TemplatePath + # + # source://actionview//lib/action_view/template_path.rb#45 + def initialize(name, prefix, partial, virtual); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template_path.rb#59 + def ==(other); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template_path.rb#59 + def eql?(other); end + + # source://actionview//lib/action_view/template_path.rb#55 + def hash; end + + # Returns the value of attribute name. + # + # source://actionview//lib/action_view/template_path.rb#10 + def name; end + + # Returns the value of attribute partial. + # + # source://actionview//lib/action_view/template_path.rb#10 + def partial; end + + # Returns the value of attribute partial. + # + # source://actionview//lib/action_view/template_path.rb#10 + def partial?; end + + # Returns the value of attribute prefix. + # + # source://actionview//lib/action_view/template_path.rb#10 + def prefix; end + + # Returns the value of attribute virtual. + # + # source://actionview//lib/action_view/template_path.rb#10 + def to_s; end + + # Returns the value of attribute virtual. + # + # source://actionview//lib/action_view/template_path.rb#10 + def to_str; end + + # Returns the value of attribute virtual. + # + # source://actionview//lib/action_view/template_path.rb#10 + def virtual; end + + # Returns the value of attribute virtual. + # + # source://actionview//lib/action_view/template_path.rb#10 + def virtual_path; end + + class << self + # Convert name, prefix, and partial into a TemplatePath + # + # source://actionview//lib/action_view/template_path.rb#41 + def build(name, prefix, partial); end + + # Build a TemplatePath form a virtual path + # + # source://actionview//lib/action_view/template_path.rb#26 + def parse(virtual); end + + # Convert name, prefix, and partial into a virtual path string + # + # source://actionview//lib/action_view/template_path.rb#15 + def virtual(name, prefix, partial); end + end +end + +# source://actionview//lib/action_view/renderer/template_renderer.rb#4 +class ActionView::TemplateRenderer < ::ActionView::AbstractRenderer + # source://actionview//lib/action_view/renderer/template_renderer.rb#5 + def render(context, options); end + + private + + # Determine the template to be rendered using the given options. + # + # source://actionview//lib/action_view/renderer/template_renderer.rb#16 + def determine_template(options); end + + # This is the method which actually finds the layout using details in the lookup + # context object. If no layout is found, it checks if at least a layout with + # the given name exists across all details before raising the error. + # + # source://actionview//lib/action_view/renderer/template_renderer.rb#87 + def find_layout(layout, keys, formats); end + + # Renders the given template. A string representing the layout can be + # supplied as well. + # + # source://actionview//lib/action_view/renderer/template_renderer.rb#58 + def render_template(view, template, layout_name, locals); end + + # source://actionview//lib/action_view/renderer/template_renderer.rb#70 + def render_with_layout(view, template, path, locals); end + + # source://actionview//lib/action_view/renderer/template_renderer.rb#91 + def resolve_layout(layout, keys, formats); end +end + +# = Action View Test Case +# +# source://actionview//lib/action_view/test_case.rb#12 +class ActionView::TestCase < ::ActiveSupport::TestCase + include ::ActionDispatch::TestProcess::FixtureFile + include ::ActionDispatch::TestProcess + include ::ActionDispatch::Assertions::ResponseAssertions + include ::ActionDispatch::Assertions::RoutingAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::AbstractController::Helpers + include ::ActiveSupport::Benchmarkable + include ::ActionView::Helpers::ActiveModelHelper + include ::ActionView::Helpers::AssetUrlHelper + include ::ActionView::Helpers::CaptureHelper + include ::ActionView::Helpers::OutputSafetyHelper + include ::ActionView::Helpers::TagHelper + include ::ActionView::Helpers::UrlHelper + include ::ActionView::Helpers::SanitizeHelper + include ::ActionView::Helpers::AssetTagHelper + include ::ActionView::Helpers::AtomFeedHelper + include ::ActionView::Helpers::CacheHelper + include ::ActionView::Helpers::ControllerHelper + include ::ActionView::Helpers::CspHelper + include ::ActionView::Helpers::CsrfHelper + include ::ActionView::Helpers::DateHelper + include ::ActionView::Helpers::DebugHelper + include ::ActionView::Helpers::TextHelper + include ::ActionView::Helpers::FormTagHelper + include ::ActionDispatch::Assertions + include ::ActionController::TemplateAssertions + include ::ActionView::Context + include ::ActionDispatch::Routing::PolymorphicRoutes + include ::ActionView::ModelNaming + include ::ActionView::RecordIdentifier + include ::ActionView::Helpers::FormHelper + include ::ActionView::Helpers::TranslationHelper + include ::ActionView::Helpers::FormOptionsHelper + include ::ActionView::Helpers::JavaScriptHelper + include ::ActionView::Helpers::NumberHelper + include ::ActionView::Helpers::RenderingHelper + include ::ActionView::Helpers + include ::ActiveSupport::Testing::ConstantLookup + include ::ActionView::RoutingUrlFor + include ::ActionView::TestCase::Behavior + extend ::AbstractController::Helpers::ClassMethods + extend ::ActionView::Helpers::UrlHelper::ClassMethods + extend ::ActionView::Helpers::SanitizeHelper::ClassMethods + extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods + extend ::ActionView::TestCase::Behavior::ClassMethods + + # source://actionpack/7.0.4.3/lib/abstract_controller/helpers.rb#11 + def _helper_methods; end + + # source://actionpack/7.0.4.3/lib/abstract_controller/helpers.rb#11 + def _helper_methods=(_arg0); end + + # source://actionpack/7.0.4.3/lib/abstract_controller/helpers.rb#11 + def _helper_methods?; end + + # source://actionview//lib/action_view/helpers/translation_helper.rb#18 + def debug_missing_translation; end + + # source://actionview//lib/action_view/helpers/translation_helper.rb#18 + def debug_missing_translation=(val); end + + class << self + # source://activesupport/7.0.4.3/lib/active_support/callbacks.rb#68 + def __callbacks; end + + # source://actionpack/7.0.4.3/lib/abstract_controller/helpers.rb#11 + def _helper_methods; end + + # source://actionpack/7.0.4.3/lib/abstract_controller/helpers.rb#11 + def _helper_methods=(value); end + + # source://actionpack/7.0.4.3/lib/abstract_controller/helpers.rb#11 + def _helper_methods?; end + + # source://actionpack/7.0.4.3/lib/abstract_controller/helpers.rb#15 + def _helpers; end + + # source://actionview//lib/action_view/helpers/translation_helper.rb#18 + def debug_missing_translation; end + + # source://actionview//lib/action_view/helpers/translation_helper.rb#18 + def debug_missing_translation=(val); end + end +end + +# source://actionview//lib/action_view/test_case.rb#42 +module ActionView::TestCase::Behavior + include ::ActionDispatch::TestProcess::FixtureFile + include ::ActionDispatch::TestProcess + include ::ActionDispatch::Assertions::ResponseAssertions + include ::ActionDispatch::Assertions::RoutingAssertions + include ::Rails::Dom::Testing::Assertions::DomAssertions + include ::Rails::Dom::Testing::Assertions::SelectorAssertions::CountDescribable + include ::Rails::Dom::Testing::Assertions::SelectorAssertions + include ::Rails::Dom::Testing::Assertions + include ::ActionDispatch::Assertions + include ::ActionController::TemplateAssertions + include ::ActionView::Context + include ::ActionDispatch::Routing::PolymorphicRoutes + include ::ActionView::ModelNaming + include ::ActionView::RecordIdentifier + include ::ActionView::RoutingUrlFor + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::Rails::Dom::Testing::Assertions + include ::AbstractController::Helpers + include ::ActionView::Helpers::UrlHelper + include ::ActionView::Helpers::SanitizeHelper + include ::ActionView::Helpers::TextHelper + include ::ActionView::Helpers::FormTagHelper + include ::ActionView::Helpers::FormHelper + include ::ActionView::Helpers::TranslationHelper + include ::ActionView::Helpers + include ::ActiveSupport::Testing::ConstantLookup + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::AbstractController::Helpers::ClassMethods + mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods + mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods + mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods + mixes_in_class_methods ::ActionView::TestCase::Behavior::ClassMethods + + # source://actionview//lib/action_view/test_case.rb#136 + def _routes; end + + # source://actionview//lib/action_view/test_case.rb#122 + def config; end + + # Returns the value of attribute controller. + # + # source://actionview//lib/action_view/test_case.rb#60 + def controller; end + + # Sets the attribute controller + # + # @param value the value to set the attribute controller to. + # + # source://actionview//lib/action_view/test_case.rb#60 + def controller=(_arg0); end + + # source://actionview//lib/action_view/test_case.rb#59 + def lookup_context(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute output_buffer. + # + # source://actionview//lib/action_view/test_case.rb#60 + def output_buffer; end + + # Sets the attribute output_buffer + # + # @param value the value to set the attribute output_buffer to. + # + # source://actionview//lib/action_view/test_case.rb#60 + def output_buffer=(_arg0); end + + # source://actionview//lib/action_view/test_case.rb#126 + def render(options = T.unsafe(nil), local_assigns = T.unsafe(nil), &block); end + + # Returns the value of attribute rendered. + # + # source://actionview//lib/action_view/test_case.rb#60 + def rendered; end + + # Sets the attribute rendered + # + # @param value the value to set the attribute rendered to. + # + # source://actionview//lib/action_view/test_case.rb#60 + def rendered=(_arg0); end + + # source://actionview//lib/action_view/test_case.rb#132 + def rendered_views; end + + # Returns the value of attribute request. + # + # source://actionview//lib/action_view/test_case.rb#60 + def request; end + + # Sets the attribute request + # + # @param value the value to set the attribute request to. + # + # source://actionview//lib/action_view/test_case.rb#60 + def request=(_arg0); end + + # source://actionview//lib/action_view/test_case.rb#108 + def setup_with_controller; end + + private + + # source://actionview//lib/action_view/test_case.rb#251 + def _user_defined_ivars; end + + # The instance of ActionView::Base that is used by +render+. + # + # source://actionview//lib/action_view/test_case.rb#207 + def _view; end + + # Need to experiment if this priority is the best one: rendered => output_buffer + # + # source://actionview//lib/action_view/test_case.rb#183 + def document_root_element; end + + # source://actionview//lib/action_view/test_case.rb#265 + def method_missing(selector, *args); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/test_case.rb#281 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end + + # The instance of ActionView::Base that is used by +render+. + # + # source://actionview//lib/action_view/test_case.rb#207 + def view; end + + # Returns a Hash of instance variables and their values, as defined by + # the user in the test case, which are then assigned to the view being + # rendered. This is generally intended for internal use and extension + # frameworks. + # + # source://actionview//lib/action_view/test_case.rb#259 + def view_assigns; end + + module GeneratedClassMethods + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + end + + module GeneratedInstanceMethods + def _helper_methods; end + def _helper_methods=(value); end + def _helper_methods?; end + end +end + +# source://actionview//lib/action_view/test_case.rb#62 +module ActionView::TestCase::Behavior::ClassMethods + # source://actionview//lib/action_view/test_case.rb#72 + def determine_default_helper_class(name); end + + # source://actionview//lib/action_view/test_case.rb#92 + def helper_class; end + + # Sets the attribute helper_class + # + # @param value the value to set the attribute helper_class to. + # + # source://actionview//lib/action_view/test_case.rb#90 + def helper_class=(_arg0); end + + # source://actionview//lib/action_view/test_case.rb#78 + def helper_method(*methods); end + + # source://actionview//lib/action_view/test_case.rb#96 + def new(*_arg0); end + + # source://actionview//lib/action_view/test_case.rb#63 + def tests(helper_class); end + + private + + # source://actionview//lib/action_view/test_case.rb#102 + def include_helper_modules!; end +end + +# source://actionview//lib/action_view/test_case.rb#220 +ActionView::TestCase::Behavior::INTERNAL_IVARS = T.let(T.unsafe(nil), Array) + +# source://actionview//lib/action_view/test_case.rb#187 +module ActionView::TestCase::Behavior::Locals + # source://actionview//lib/action_view/test_case.rb#190 + def render(options = T.unsafe(nil), local_assigns = T.unsafe(nil)); end + + # Returns the value of attribute rendered_views. + # + # source://actionview//lib/action_view/test_case.rb#188 + def rendered_views; end + + # Sets the attribute rendered_views + # + # @param value the value to set the attribute rendered_views to. + # + # source://actionview//lib/action_view/test_case.rb#188 + def rendered_views=(_arg0); end +end + +# Need to experiment if this priority is the best one: rendered => output_buffer +# +# source://actionview//lib/action_view/test_case.rb#141 +class ActionView::TestCase::Behavior::RenderedViewsCollection + # @return [RenderedViewsCollection] a new instance of RenderedViewsCollection + # + # source://actionview//lib/action_view/test_case.rb#142 + def initialize; end + + # source://actionview//lib/action_view/test_case.rb#146 + def add(view, locals); end + + # source://actionview//lib/action_view/test_case.rb#151 + def locals_for(view); end + + # source://actionview//lib/action_view/test_case.rb#155 + def rendered_views; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/test_case.rb#159 + def view_rendered?(view, expected_locals); end +end + +# source://actionview//lib/action_view/test_case.rb#0 +module ActionView::TestCase::HelperMethods + # source://actionview//lib/action_view/test_case.rb#175 + def _test_case; end + + # source://actionview//lib/action_view/test_case.rb#171 + def protect_against_forgery?; end +end + +# source://actionview//lib/action_view/test_case.rb#13 +class ActionView::TestCase::TestController < ::ActionController::Base + include ::ActionDispatch::TestProcess::FixtureFile + include ::ActionDispatch::TestProcess + + # @return [TestController] a new instance of TestController + # + # source://actionview//lib/action_view/test_case.rb#31 + def initialize; end + + # source://actionview//lib/action_view/test_case.rb#23 + def controller_path=(path); end + + # Returns the value of attribute params. + # + # source://actionview//lib/action_view/test_case.rb#16 + def params; end + + # Sets the attribute params + # + # @param value the value to set the attribute params to. + # + # source://actionview//lib/action_view/test_case.rb#16 + def params=(_arg0); end + + # Returns the value of attribute request. + # + # source://actionview//lib/action_view/test_case.rb#16 + def request; end + + # Sets the attribute request + # + # @param value the value to set the attribute request to. + # + # source://actionview//lib/action_view/test_case.rb#16 + def request=(_arg0); end + + # Returns the value of attribute response. + # + # source://actionview//lib/action_view/test_case.rb#16 + def response; end + + # Sets the attribute response + # + # @param value the value to set the attribute response to. + # + # source://actionview//lib/action_view/test_case.rb#16 + def response=(_arg0); end + + private + + # source://actionview//lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + class << self + # source://actionview//lib/action_view/test_case.rb#27 + def controller_name; end + + # Overrides AbstractController::Base#controller_path + # + # source://actionview//lib/action_view/test_case.rb#20 + def controller_path; end + + # Overrides AbstractController::Base#controller_path + # + # source://actionview//lib/action_view/test_case.rb#20 + def controller_path=(_arg0); end + + # source://actionpack/7.0.4.3/lib/action_controller/metal.rb#210 + def middleware_stack; end + end +end + +# source://actionview//lib/action_view/unbound_template.rb#6 +class ActionView::UnboundTemplate + # @return [UnboundTemplate] a new instance of UnboundTemplate + # + # source://actionview//lib/action_view/unbound_template.rb#10 + def initialize(source, identifier, details:, virtual_path:); end + + # source://actionview//lib/action_view/unbound_template.rb#20 + def bind_locals(locals); end + + # Returns the value of attribute details. + # + # source://actionview//lib/action_view/unbound_template.rb#7 + def details; end + + # source://actionview//lib/action_view/unbound_template.rb#8 + def format(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/unbound_template.rb#8 + def handler(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/unbound_template.rb#8 + def locale(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/unbound_template.rb#8 + def variant(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute virtual_path. + # + # source://actionview//lib/action_view/unbound_template.rb#7 + def virtual_path; end + + private + + # source://actionview//lib/action_view/unbound_template.rb#39 + def build_template(locals); end + + # source://actionview//lib/action_view/unbound_template.rb#53 + def normalize_locals(locals); end +end + +# source://actionview//lib/action_view/gem_version.rb#9 +module ActionView::VERSION; end + +# source://actionview//lib/action_view/gem_version.rb#10 +ActionView::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# source://actionview//lib/action_view/gem_version.rb#11 +ActionView::VERSION::MINOR = T.let(T.unsafe(nil), Integer) + +# source://actionview//lib/action_view/gem_version.rb#13 +ActionView::VERSION::PRE = T.let(T.unsafe(nil), String) + +# source://actionview//lib/action_view/gem_version.rb#15 +ActionView::VERSION::STRING = T.let(T.unsafe(nil), String) + +# source://actionview//lib/action_view/gem_version.rb#12 +ActionView::VERSION::TINY = T.let(T.unsafe(nil), Integer) + +# source://actionview//lib/action_view/view_paths.rb#4 +module ActionView::ViewPaths + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods + + # The prefixes used in render "foo" shortcuts. + # + # source://actionview//lib/action_view/view_paths.rb#90 + def _prefixes; end + + # source://actionview//lib/action_view/view_paths.rb#11 + def any_templates?(*_arg0, **_arg1, &_arg2); end + + # Append a path to the list of view paths for the current LookupContext. + # + # ==== Parameters + # * path - If a String is provided, it gets converted into + # the default view path. You may also provide a custom view path + # (see ActionView::PathSet for more information) + # + # source://actionview//lib/action_view/view_paths.rb#112 + def append_view_path(path); end + + # source://actionview//lib/action_view/view_paths.rb#102 + def details_for_lookup; end + + # source://actionview//lib/action_view/view_paths.rb#11 + def formats(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/view_paths.rb#11 + def formats=(arg); end + + # source://actionview//lib/action_view/view_paths.rb#11 + def locale(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/view_paths.rb#11 + def locale=(arg); end + + # LookupContext is the object responsible for holding all + # information required for looking up templates, i.e. view paths and + # details. Check ActionView::LookupContext for more information. + # + # source://actionview//lib/action_view/view_paths.rb#97 + def lookup_context; end + + # Prepend a path to the list of view paths for the current LookupContext. + # + # ==== Parameters + # * path - If a String is provided, it gets converted into + # the default view path. You may also provide a custom view path + # (see ActionView::PathSet for more information) + # + # source://actionview//lib/action_view/view_paths.rb#122 + def prepend_view_path(path); end + + # source://actionview//lib/action_view/view_paths.rb#11 + def template_exists?(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/view_paths.rb#11 + def view_paths(*_arg0, **_arg1, &_arg2); end + + class << self + # source://actionview//lib/action_view/view_paths.rb#84 + def all_view_paths; end + + # source://actionview//lib/action_view/view_paths.rb#76 + def get_view_paths(klass); end + + # source://actionview//lib/action_view/view_paths.rb#80 + def set_view_paths(klass, paths); end + end +end + +# source://actionview//lib/action_view/view_paths.rb#14 +module ActionView::ViewPaths::ClassMethods + # source://actionview//lib/action_view/view_paths.rb#23 + def _prefixes; end + + # source://actionview//lib/action_view/view_paths.rb#15 + def _view_paths; end + + # source://actionview//lib/action_view/view_paths.rb#19 + def _view_paths=(paths); end + + # Append a path to the list of view paths for this controller. + # + # ==== Parameters + # * path - If a String is provided, it gets converted into + # the default view path. You may also provide a custom view path + # (see ActionView::PathSet for more information) + # + # source://actionview//lib/action_view/view_paths.rb#37 + def append_view_path(path); end + + # Prepend a path to the list of view paths for this controller. + # + # ==== Parameters + # * path - If a String is provided, it gets converted into + # the default view path. You may also provide a custom view path + # (see ActionView::PathSet for more information) + # + # source://actionview//lib/action_view/view_paths.rb#47 + def prepend_view_path(path); end + + # A list of all of the default view paths for this controller. + # + # source://actionview//lib/action_view/view_paths.rb#52 + def view_paths; end + + # Set the view paths. + # + # ==== Parameters + # * paths - If a PathSet is provided, use that; + # otherwise, process the parameter into a PathSet. + # + # source://actionview//lib/action_view/view_paths.rb#61 + def view_paths=(paths); end + + private + + # Override this method in your controller if you want to change paths prefixes for finding views. + # Prefixes defined here will still be added to parents' ._prefixes. + # + # source://actionview//lib/action_view/view_paths.rb#68 + def local_prefixes; end +end + +# source://actionview//lib/action_view/template/error.rb#13 +class ActionView::WrongEncodingError < ::ActionView::EncodingError + # @return [WrongEncodingError] a new instance of WrongEncodingError + # + # source://actionview//lib/action_view/template/error.rb#14 + def initialize(string, encoding); end + + # source://actionview//lib/action_view/template/error.rb#18 + def message; end +end + +module ERB::Escape + private + + def html_escape(_arg0); end + + class << self + def html_escape(_arg0); end + end +end diff --git a/sorbet/rbi/gems/activejob@7.0.4.3.rbi b/sorbet/rbi/gems/activejob@7.0.4.3.rbi new file mode 100644 index 0000000..7a79a72 --- /dev/null +++ b/sorbet/rbi/gems/activejob@7.0.4.3.rbi @@ -0,0 +1,8 @@ +# 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`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/activemodel@7.0.4.3.rbi b/sorbet/rbi/gems/activemodel@7.0.4.3.rbi new file mode 100644 index 0000000..8ba1b8c --- /dev/null +++ b/sorbet/rbi/gems/activemodel@7.0.4.3.rbi @@ -0,0 +1,8 @@ +# 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`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/activerecord@7.0.4.3.rbi b/sorbet/rbi/gems/activerecord@7.0.4.3.rbi new file mode 100644 index 0000000..14527c0 --- /dev/null +++ b/sorbet/rbi/gems/activerecord@7.0.4.3.rbi @@ -0,0 +1,8 @@ +# 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`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/activestorage@7.0.4.3.rbi b/sorbet/rbi/gems/activestorage@7.0.4.3.rbi new file mode 100644 index 0000000..811f2d0 --- /dev/null +++ b/sorbet/rbi/gems/activestorage@7.0.4.3.rbi @@ -0,0 +1,8 @@ +# 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`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/activesupport@7.0.4.3.rbi b/sorbet/rbi/gems/activesupport@7.0.4.3.rbi new file mode 100644 index 0000000..a8f0e2d --- /dev/null +++ b/sorbet/rbi/gems/activesupport@7.0.4.3.rbi @@ -0,0 +1,18133 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `activesupport` gem. +# Please instead update this file by running `bin/tapioca gem activesupport`. + +# source://activesupport//lib/active_support/lazy_load_hooks.rb#3 +module ActiveSupport + extend ::ActiveSupport::LazyLoadHooks + extend ::ActiveSupport::Autoload + + # source://activesupport//lib/active_support/json/decoding.rb#9 + def parse_json_times; end + + # source://activesupport//lib/active_support/json/decoding.rb#9 + def parse_json_times=(val); end + + # source://activesupport//lib/active_support.rb#94 + def test_order; end + + # source://activesupport//lib/active_support.rb#94 + def test_order=(val); end + + # source://activesupport//lib/active_support.rb#95 + def test_parallelization_threshold; end + + # source://activesupport//lib/active_support.rb#95 + def test_parallelization_threshold=(val); end + + class << self + # source://activesupport//lib/active_support.rb#99 + def cache_format_version; end + + # source://activesupport//lib/active_support.rb#103 + def cache_format_version=(value); end + + # source://activesupport//lib/active_support.rb#88 + def eager_load!; end + + # source://activesupport//lib/active_support.rb#97 + def error_reporter; end + + # source://activesupport//lib/active_support.rb#97 + def error_reporter=(_arg0); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def escape_html_entities_in_json(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def escape_html_entities_in_json=(arg); end + + # Returns the currently loaded version of Active Support as a Gem::Version. + # + # source://activesupport//lib/active_support/gem_version.rb#5 + def gem_version; end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def json_encoder(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def json_encoder=(arg); end + + # source://activesupport//lib/active_support/json/decoding.rb#9 + def parse_json_times; end + + # source://activesupport//lib/active_support/json/decoding.rb#9 + def parse_json_times=(val); end + + # source://activesupport//lib/active_support.rb#94 + def test_order; end + + # source://activesupport//lib/active_support.rb#94 + def test_order=(val); end + + # source://activesupport//lib/active_support.rb#95 + def test_parallelization_threshold; end + + # source://activesupport//lib/active_support.rb#95 + def test_parallelization_threshold=(val); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def time_precision(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def time_precision=(arg); end + + # source://activesupport//lib/active_support.rb#107 + def to_time_preserves_timezone; end + + # source://activesupport//lib/active_support.rb#111 + def to_time_preserves_timezone=(value); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def use_standard_json_time_format(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def use_standard_json_time_format=(arg); end + + # source://activesupport//lib/active_support.rb#115 + def utc_to_local_returns_utc_offset_times; end + + # source://activesupport//lib/active_support.rb#119 + def utc_to_local_returns_utc_offset_times=(value); end + + # Returns the currently loaded version of Active Support as a Gem::Version. + # + # source://activesupport//lib/active_support/version.rb#7 + def version; end + end +end + +# Actionable errors lets you define actions to resolve an error. +# +# To make an error actionable, include the ActiveSupport::ActionableError +# module and invoke the +action+ class macro to define the action. An action +# needs a name and a block to execute. +# +# source://activesupport//lib/active_support/actionable_error.rb#9 +module ActiveSupport::ActionableError + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveSupport::ActionableError::ClassMethods + + class << self + # source://activesupport//lib/active_support/actionable_error.rb#18 + def actions(error); end + + # source://activesupport//lib/active_support/actionable_error.rb#27 + def dispatch(error, name); end + end + + module GeneratedClassMethods + def _actions; end + def _actions=(value); end + def _actions?; end + end + + module GeneratedInstanceMethods + def _actions; end + def _actions=(value); end + def _actions?; end + end +end + +# source://activesupport//lib/active_support/actionable_error.rb#33 +module ActiveSupport::ActionableError::ClassMethods + # Defines an action that can resolve the error. + # + # class PendingMigrationError < MigrationError + # include ActiveSupport::ActionableError + # + # action "Run pending migrations" do + # ActiveRecord::Tasks::DatabaseTasks.migrate + # end + # end + # + # source://activesupport//lib/active_support/actionable_error.rb#43 + def action(name, &block); end +end + +# source://activesupport//lib/active_support/actionable_error.rb#12 +class ActiveSupport::ActionableError::NonActionable < ::StandardError; end + +# Wrapping an array in an +ArrayInquirer+ gives a friendlier way to check +# its string-like contents: +# +# variants = ActiveSupport::ArrayInquirer.new([:phone, :tablet]) +# +# variants.phone? # => true +# variants.tablet? # => true +# variants.desktop? # => false +# +# source://activesupport//lib/active_support/array_inquirer.rb#24 +class ActiveSupport::ArrayInquirer < ::Array + # Passes each element of +candidates+ collection to ArrayInquirer collection. + # The method returns true if any element from the ArrayInquirer collection + # is equal to the stringified or symbolized form of any element in the +candidates+ collection. + # + # If +candidates+ collection is not given, method returns true. + # + # variants = ActiveSupport::ArrayInquirer.new([:phone, :tablet]) + # + # variants.any? # => true + # variants.any?(:phone, :tablet) # => true + # variants.any?('phone', 'desktop') # => true + # variants.any?(:desktop, :watch) # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/array_inquirer.rb#25 + def any?(*candidates); end + + private + + # source://activesupport//lib/active_support/array_inquirer.rb#40 + def method_missing(name, *args); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/array_inquirer.rb#36 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end +end + +# Autoload and eager load conveniences for your library. +# +# This module allows you to define autoloads based on +# Rails conventions (i.e. no need to define the path +# it is automatically guessed based on the filename) +# and also define a set of constants that needs to be +# eager loaded: +# +# module MyLib +# extend ActiveSupport::Autoload +# +# autoload :Model +# +# eager_autoload do +# autoload :Cache +# end +# end +# +# Then your library can be eager loaded by simply calling: +# +# MyLib.eager_load! +# +# source://activesupport//lib/active_support/dependencies/autoload.rb#27 +module ActiveSupport::Autoload + # source://activesupport//lib/active_support/dependencies/autoload.rb#37 + def autoload(const_name, path = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/dependencies/autoload.rb#57 + def autoload_at(path); end + + # source://activesupport//lib/active_support/dependencies/autoload.rb#50 + def autoload_under(path); end + + # source://activesupport//lib/active_support/dependencies/autoload.rb#75 + def autoloads; end + + # source://activesupport//lib/active_support/dependencies/autoload.rb#64 + def eager_autoload; end + + # source://activesupport//lib/active_support/dependencies/autoload.rb#71 + def eager_load!; end + + class << self + # source://activesupport//lib/active_support/dependencies/autoload.rb#28 + def extended(base); end + end +end + +# Backtraces often include many lines that are not relevant for the context +# under review. This makes it hard to find the signal amongst the backtrace +# noise, and adds debugging time. With a BacktraceCleaner, filters and +# silencers are used to remove the noisy lines, so that only the most relevant +# lines remain. +# +# Filters are used to modify lines of data, while silencers are used to remove +# lines entirely. The typical filter use case is to remove lengthy path +# information from the start of each line, and view file paths relevant to the +# app directory instead of the file system root. The typical silencer use case +# is to exclude the output of a noisy library from the backtrace, so that you +# can focus on the rest. +# +# bc = ActiveSupport::BacktraceCleaner.new +# bc.add_filter { |line| line.gsub(Rails.root.to_s, '') } # strip the Rails.root prefix +# bc.add_silencer { |line| /puma|rubygems/.match?(line) } # skip any lines from puma or rubygems +# bc.clean(exception.backtrace) # perform the cleanup +# +# To reconfigure an existing BacktraceCleaner (like the default one in Rails) +# and show as much data as possible, you can always call +# BacktraceCleaner#remove_silencers!, which will restore the +# backtrace to a pristine state. If you need to reconfigure an existing +# BacktraceCleaner so that it does not filter or modify the paths of any lines +# of the backtrace, you can call BacktraceCleaner#remove_filters! +# These two methods will give you a completely untouched backtrace. +# +# Inspired by the Quiet Backtrace gem by thoughtbot. +# +# source://activesupport//lib/active_support/backtrace_cleaner.rb#31 +class ActiveSupport::BacktraceCleaner + # @return [BacktraceCleaner] a new instance of BacktraceCleaner + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#32 + def initialize; end + + # Adds a filter from the block provided. Each line in the backtrace will be + # mapped against this filter. + # + # # Will turn "/my/rails/root/app/models/person.rb" into "/app/models/person.rb" + # backtrace_cleaner.add_filter { |line| line.gsub(Rails.root, '') } + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#60 + def add_filter(&block); end + + # Adds a silencer from the block provided. If the silencer returns +true+ + # for a given line, it will be excluded from the clean backtrace. + # + # # Will reject all lines that include the word "puma", like "/gems/puma/server.rb" or "/app/my_puma_server/rb" + # backtrace_cleaner.add_silencer { |line| /puma/.match?(line) } + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#69 + def add_silencer(&block); end + + # Returns the backtrace after all filters and silencers have been run + # against it. Filters run first, then silencers. + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#41 + def clean(backtrace, kind = T.unsafe(nil)); end + + # Returns the backtrace after all filters and silencers have been run + # against it. Filters run first, then silencers. + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#41 + def filter(backtrace, kind = T.unsafe(nil)); end + + # Removes all filters, but leaves in the silencers. Useful if you suddenly + # need to see entire filepaths in the backtrace that you had already + # filtered out. + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#83 + def remove_filters!; end + + # Removes all silencers, but leaves in the filters. Useful if your + # context of debugging suddenly expands as you suspect a bug in one of + # the libraries you use. + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#76 + def remove_silencers!; end + + private + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#90 + def add_gem_filter; end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#99 + def add_gem_silencer; end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#103 + def add_stdlib_silencer; end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#107 + def filter_backtrace(backtrace); end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#123 + def noise(backtrace); end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#115 + def silence(backtrace); end +end + +# source://activesupport//lib/active_support/backtrace_cleaner.rb#88 +ActiveSupport::BacktraceCleaner::FORMATTED_GEMS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/benchmarkable.rb#7 +module ActiveSupport::Benchmarkable + # Allows you to measure the execution time of a block in a template and + # records the result to the log. Wrap this block around expensive operations + # or possible bottlenecks to get a time reading for the operation. For + # example, let's say you thought your file processing method was taking too + # long; you could wrap it in a benchmark block. + # + # <% benchmark 'Process data files' do %> + # <%= expensive_files_operation %> + # <% end %> + # + # That would add something like "Process data files (345.2ms)" to the log, + # which you can then use to compare timings when optimizing your code. + # + # You may give an optional logger level (:debug, :info, + # :warn, :error) as the :level option. The + # default logger level value is :info. + # + # <% benchmark 'Low-level files', level: :debug do %> + # <%= lowlevel_files_operation %> + # <% end %> + # + # Finally, you can pass true as the third argument to silence all log + # activity (other than the timing information) from inside the block. This + # is great for boiling down a noisy block to just a single statement that + # produces one log line: + # + # <% benchmark 'Process data files', level: :info, silence: true do %> + # <%= expensive_and_chatty_files_operation %> + # <% end %> + # + # source://activesupport//lib/active_support/benchmarkable.rb#37 + def benchmark(message = T.unsafe(nil), options = T.unsafe(nil), &block); end +end + +# source://activesupport//lib/active_support/core_ext/big_decimal/conversions.rb#7 +module ActiveSupport::BigDecimalWithDefaultFormat + # source://activesupport//lib/active_support/core_ext/big_decimal/conversions.rb#8 + def to_s(format = T.unsafe(nil)); end +end + +# See ActiveSupport::Cache::Store for documentation. +# +# source://activesupport//lib/active_support/cache.rb#16 +module ActiveSupport::Cache + class << self + # Expands out the +key+ argument into a key that can be used for the + # cache store. Optionally accepts a namespace, and all keys will be + # scoped within that namespace. + # + # If the +key+ argument provided is an array, or responds to +to_a+, then + # each of elements in the array will be turned into parameters/keys and + # concatenated into a single key. For example: + # + # ActiveSupport::Cache.expand_cache_key([:foo, :bar]) # => "foo/bar" + # ActiveSupport::Cache.expand_cache_key([:foo, :bar], "namespace") # => "namespace/foo/bar" + # + # The +key+ argument can also respond to +cache_key+ or +to_param+. + # + # source://activesupport//lib/active_support/cache.rb#100 + def expand_cache_key(key, namespace = T.unsafe(nil)); end + + # Returns the value of attribute format_version. + # + # source://activesupport//lib/active_support/cache.rb#41 + def format_version; end + + # Sets the attribute format_version + # + # @param value the value to set the attribute format_version to. + # + # source://activesupport//lib/active_support/cache.rb#41 + def format_version=(_arg0); end + + # Creates a new Store object according to the given options. + # + # If no arguments are passed to this method, then a new + # ActiveSupport::Cache::MemoryStore object will be returned. + # + # If you pass a Symbol as the first argument, then a corresponding cache + # store class under the ActiveSupport::Cache namespace will be created. + # For example: + # + # ActiveSupport::Cache.lookup_store(:memory_store) + # # => returns a new ActiveSupport::Cache::MemoryStore object + # + # ActiveSupport::Cache.lookup_store(:mem_cache_store) + # # => returns a new ActiveSupport::Cache::MemCacheStore object + # + # Any additional arguments will be passed to the corresponding cache store + # class's constructor: + # + # ActiveSupport::Cache.lookup_store(:file_store, '/tmp/cache') + # # => same as: ActiveSupport::Cache::FileStore.new('/tmp/cache') + # + # If the first argument is not a Symbol, then it will simply be returned: + # + # ActiveSupport::Cache.lookup_store(MyOwnCacheStore.new) + # # => returns MyOwnCacheStore.new + # + # source://activesupport//lib/active_support/cache.rb#68 + def lookup_store(store = T.unsafe(nil), *parameters); end + + private + + # source://activesupport//lib/active_support/cache.rb#112 + def retrieve_cache_key(key); end + + # Obtains the specified cache store class, given the name of the +store+. + # Raises an error when the store class cannot be found. + # + # source://activesupport//lib/active_support/cache.rb#124 + def retrieve_store_class(store); end + end +end + +# source://activesupport//lib/active_support/cache.rb#833 +module ActiveSupport::Cache::Coders + class << self + # source://activesupport//lib/active_support/cache.rb#839 + def [](version); end + end +end + +# source://activesupport//lib/active_support/cache.rb#851 +module ActiveSupport::Cache::Coders::Loader + extend ::ActiveSupport::Cache::Coders::Loader + + # source://activesupport//lib/active_support/cache.rb#854 + def load(payload); end +end + +# The one set by Marshal. +# +# source://activesupport//lib/active_support/cache.rb#834 +ActiveSupport::Cache::Coders::MARK_61 = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache.rb#836 +ActiveSupport::Cache::Coders::MARK_70_COMPRESSED = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache.rb#835 +ActiveSupport::Cache::Coders::MARK_70_UNCOMPRESSED = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache.rb#874 +module ActiveSupport::Cache::Coders::Rails61Coder + include ::ActiveSupport::Cache::Coders::Loader + extend ::ActiveSupport::Cache::Coders::Loader + extend ::ActiveSupport::Cache::Coders::Rails61Coder + + # source://activesupport//lib/active_support/cache.rb#878 + def dump(entry); end + + # source://activesupport//lib/active_support/cache.rb#882 + def dump_compressed(entry, threshold); end +end + +# source://activesupport//lib/active_support/cache.rb#887 +module ActiveSupport::Cache::Coders::Rails70Coder + include ::ActiveSupport::Cache::Coders::Loader + extend ::ActiveSupport::Cache::Coders::Loader + extend ::ActiveSupport::Cache::Coders::Rails70Coder + + # source://activesupport//lib/active_support/cache.rb#891 + def dump(entry); end + + # source://activesupport//lib/active_support/cache.rb#895 + def dump_compressed(entry, threshold); end +end + +# source://activesupport//lib/active_support/cache.rb#27 +ActiveSupport::Cache::DEFAULT_COMPRESS_LIMIT = T.let(T.unsafe(nil), Integer) + +# This class is used to represent cache entries. Cache entries have a value, an optional +# expiration time, and an optional version. The expiration time is used to support the :race_condition_ttl option +# on the cache. The version is used to support the :version option on the cache for rejecting +# mismatches. +# +# Since cache entries in most instances will be serialized, the internals of this class are highly optimized +# using short instance variable names that are lazily defined. +# +# source://activesupport//lib/active_support/cache.rb#916 +class ActiveSupport::Cache::Entry + # Creates a new cache entry for the specified value. Options supported are + # +:compressed+, +:version+, +:expires_at+ and +:expires_in+. + # + # @return [Entry] a new instance of Entry + # + # source://activesupport//lib/active_support/cache.rb#927 + def initialize(value, compressed: T.unsafe(nil), version: T.unsafe(nil), expires_in: T.unsafe(nil), expires_at: T.unsafe(nil), **_arg5); end + + # Returns the size of the cached value. This could be less than + # value.bytesize if the data is compressed. + # + # source://activesupport//lib/active_support/cache.rb#963 + def bytesize; end + + # source://activesupport//lib/active_support/cache.rb#978 + def compressed(compress_threshold); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache.rb#974 + def compressed?; end + + # Duplicates the value in a class. This is used by cache implementations that don't natively + # serialize entries to protect against accidental cache modifications. + # + # source://activesupport//lib/active_support/cache.rb#1008 + def dup_value!; end + + # Checks if the entry is expired. The +expires_in+ parameter can override + # the value set when the entry was created. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache.rb#945 + def expired?; end + + # source://activesupport//lib/active_support/cache.rb#949 + def expires_at; end + + # source://activesupport//lib/active_support/cache.rb#953 + def expires_at=(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache.rb#1002 + def local?; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache.rb#939 + def mismatched?(version); end + + # source://activesupport//lib/active_support/cache.rb#1018 + def pack; end + + # source://activesupport//lib/active_support/cache.rb#935 + def value; end + + # Returns the value of attribute version. + # + # source://activesupport//lib/active_support/cache.rb#923 + def version; end + + private + + # source://activesupport//lib/active_support/cache.rb#1025 + def uncompress(value); end + + class << self + # source://activesupport//lib/active_support/cache.rb#918 + def unpack(members); end + end +end + +# A cache store implementation which stores everything on the filesystem. +# +# FileStore implements the Strategy::LocalCache strategy which implements +# an in-memory cache inside of a block. +# +# source://activesupport//lib/active_support/cache/file_store.rb#13 +class ActiveSupport::Cache::FileStore < ::ActiveSupport::Cache::Store + # @return [FileStore] a new instance of FileStore + # + # source://activesupport//lib/active_support/cache/file_store.rb#21 + def initialize(cache_path, **options); end + + # Returns the value of attribute cache_path. + # + # source://activesupport//lib/active_support/cache/file_store.rb#14 + def cache_path; end + + # Preemptively iterates through all stored keys and removes the ones which have expired. + # + # source://activesupport//lib/active_support/cache/file_store.rb#41 + def cleanup(options = T.unsafe(nil)); end + + # Deletes all items from the cache. In this case it deletes all the entries in the specified + # file store directory except for .keep or .gitkeep. Be careful which directory is specified in your + # config file when using +FileStore+ because everything in that directory will be deleted. + # + # source://activesupport//lib/active_support/cache/file_store.rb#34 + def clear(options = T.unsafe(nil)); end + + # Decrements an already existing integer value that is stored in the cache. + # If the key is not found nothing is done. + # + # source://activesupport//lib/active_support/cache/file_store.rb#57 + def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/file_store.rb#61 + def delete_matched(matcher, options = T.unsafe(nil)); end + + # Increments an already existing integer value that is stored in the cache. + # If the key is not found nothing is done. + # + # source://activesupport//lib/active_support/cache/file_store.rb#51 + def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + private + + # Delete empty directories in the cache. + # + # source://activesupport//lib/active_support/cache/file_store.rb#160 + def delete_empty_directories(dir); end + + # source://activesupport//lib/active_support/cache/file_store.rb#98 + def delete_entry(key, **options); end + + # Make sure a file path's directories exist. + # + # source://activesupport//lib/active_support/cache/file_store.rb#169 + def ensure_cache_path(path); end + + # Translate a file path into a key. + # + # source://activesupport//lib/active_support/cache/file_store.rb#154 + def file_path_key(path); end + + # Lock a file for a block so only one process can modify it at a time. + # + # source://activesupport//lib/active_support/cache/file_store.rb#113 + def lock_file(file_name, &block); end + + # Modifies the amount of an already existing integer value that is stored in the cache. + # If the key is not found nothing is done. + # + # source://activesupport//lib/active_support/cache/file_store.rb#187 + def modify_value(name, amount, options); end + + # Translate a key into a file path. + # + # source://activesupport//lib/active_support/cache/file_store.rb#127 + def normalize_key(key, options); end + + # source://activesupport//lib/active_support/cache/file_store.rb#73 + def read_entry(key, **options); end + + # source://activesupport//lib/active_support/cache/file_store.rb#80 + def read_serialized_entry(key, **_arg1); end + + # source://activesupport//lib/active_support/cache/file_store.rb#173 + def search_dir(dir, &callback); end + + # source://activesupport//lib/active_support/cache/file_store.rb#87 + def write_entry(key, entry, **options); end + + # source://activesupport//lib/active_support/cache/file_store.rb#91 + def write_serialized_entry(key, payload, **options); end + + class << self + # Advertise cache versioning support. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/file_store.rb#27 + def supports_cache_versioning?; end + end +end + +# source://activesupport//lib/active_support/cache/file_store.rb#16 +ActiveSupport::Cache::FileStore::DIR_FORMATTER = T.let(T.unsafe(nil), String) + +# max filename size on file system is 255, minus room for timestamp, pid, and random characters appended by Tempfile (used by atomic write) +# +# source://activesupport//lib/active_support/cache/file_store.rb#17 +ActiveSupport::Cache::FileStore::FILENAME_MAX_SIZE = T.let(T.unsafe(nil), Integer) + +# max is 1024, plus some room +# +# source://activesupport//lib/active_support/cache/file_store.rb#18 +ActiveSupport::Cache::FileStore::FILEPATH_MAX_SIZE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/cache/file_store.rb#19 +ActiveSupport::Cache::FileStore::GITKEEP_FILES = T.let(T.unsafe(nil), Array) + +# A cache store implementation which stores everything into memory in the +# same process. If you're running multiple Ruby on Rails server processes +# (which is the case if you're using Phusion Passenger or puma clustered mode), +# then this means that Rails server process instances won't be able +# to share cache data with each other and this may not be the most +# appropriate cache in that scenario. +# +# This cache has a bounded size specified by the +:size+ options to the +# initializer (default is 32Mb). When the cache exceeds the allotted size, +# a cleanup will occur which tries to prune the cache down to three quarters +# of the maximum size by removing the least recently used entries. +# +# Unlike other Cache store implementations, MemoryStore does not compress +# values by default. MemoryStore does not benefit from compression as much +# as other Store implementations, as it does not send data over a network. +# However, when compression is enabled, it still pays the full cost of +# compression in terms of cpu use. +# +# MemoryStore is thread-safe. +# +# source://activesupport//lib/active_support/cache/memory_store.rb#26 +class ActiveSupport::Cache::MemoryStore < ::ActiveSupport::Cache::Store + # @return [MemoryStore] a new instance of MemoryStore + # + # source://activesupport//lib/active_support/cache/memory_store.rb#48 + def initialize(options = T.unsafe(nil)); end + + # Preemptively iterates through all stored keys and removes the ones which have expired. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#75 + def cleanup(options = T.unsafe(nil)); end + + # Delete all data stored in a given cache store. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#67 + def clear(options = T.unsafe(nil)); end + + # Decrement an integer value in the cache. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#117 + def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # Deletes cache entries if the cache key matches a given pattern. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#122 + def delete_matched(matcher, options = T.unsafe(nil)); end + + # Increment an integer value in the cache. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#112 + def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#133 + def inspect; end + + # To ensure entries fit within the specified memory prune the cache by removing the least + # recently accessed entries. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#88 + def prune(target_size, max_time = T.unsafe(nil)); end + + # Returns true if the cache is currently being pruned. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/memory_store.rb#107 + def pruning?; end + + # Synchronize calls to the cache. This should be called wherever the underlying cache implementation + # is not thread safe. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#139 + def synchronize(&block); end + + private + + # source://activesupport//lib/active_support/cache/memory_store.rb#150 + def cached_size(key, payload); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#146 + def default_coder; end + + # source://activesupport//lib/active_support/cache/memory_store.rb#183 + def delete_entry(key, **options); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#191 + def modify_value(name, amount, options); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#154 + def read_entry(key, **options); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#166 + def write_entry(key, entry, **options); end + + class << self + # Advertise cache versioning support. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/memory_store.rb#62 + def supports_cache_versioning?; end + end +end + +# source://activesupport//lib/active_support/cache/memory_store.rb#27 +module ActiveSupport::Cache::MemoryStore::DupCoder + extend ::ActiveSupport::Cache::MemoryStore::DupCoder + + # source://activesupport//lib/active_support/cache/memory_store.rb#30 + def dump(entry); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#35 + def dump_compressed(entry, threshold); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#41 + def load(entry); end +end + +# source://activesupport//lib/active_support/cache/memory_store.rb#144 +ActiveSupport::Cache::MemoryStore::PER_ENTRY_OVERHEAD = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/cache.rb#817 +module ActiveSupport::Cache::NullCoder + extend ::ActiveSupport::Cache::NullCoder + + # source://activesupport//lib/active_support/cache.rb#820 + def dump(entry); end + + # source://activesupport//lib/active_support/cache.rb#824 + def dump_compressed(entry, threshold); end + + # source://activesupport//lib/active_support/cache.rb#828 + def load(payload); end +end + +# A cache store implementation which doesn't actually store anything. Useful in +# development and test environments where you don't want caching turned on but +# need to go through the caching interface. +# +# This cache does implement the local cache strategy, so values will actually +# be cached inside blocks that utilize this strategy. See +# ActiveSupport::Cache::Strategy::LocalCache for more details. +# +# source://activesupport//lib/active_support/cache/null_store.rb#12 +class ActiveSupport::Cache::NullStore < ::ActiveSupport::Cache::Store + include ::ActiveSupport::Cache::Strategy::LocalCache + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#81 + def cleanup(**options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#75 + def clear(**options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#100 + def decrement(name, amount = T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#87 + def delete_matched(matcher, options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#93 + def increment(name, amount = T.unsafe(nil), **options); end + + private + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#147 + def delete_entry(key, **_arg1); end + + # source://activesupport//lib/active_support/cache/null_store.rb#36 + def read_entry(key, **s); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#108 + def read_serialized_entry(key, raw: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/cache/null_store.rb#43 + def write_entry(key, entry, **_arg2); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#138 + def write_serialized_entry(key, payload, **_arg2); end + + class << self + # Advertise cache versioning support. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/null_store.rb#16 + def supports_cache_versioning?; end + end +end + +# Mapping of canonical option names to aliases that a store will recognize. +# +# source://activesupport//lib/active_support/cache.rb#30 +ActiveSupport::Cache::OPTION_ALIASES = T.let(T.unsafe(nil), Hash) + +# An abstract cache store class. There are multiple cache store +# implementations, each having its own additional features. See the classes +# under the ActiveSupport::Cache module, e.g. +# ActiveSupport::Cache::MemCacheStore. MemCacheStore is currently the most +# popular cache store for large production websites. +# +# Some implementations may not support all methods beyond the basic cache +# methods of #fetch, #write, #read, #exist?, and #delete. +# +# ActiveSupport::Cache::Store can store any Ruby object that is supported by +# its +coder+'s +dump+ and +load+ methods. +# +# cache = ActiveSupport::Cache::MemoryStore.new +# +# cache.read('city') # => nil +# cache.write('city', "Duckburgh") +# cache.read('city') # => "Duckburgh" +# +# cache.write('not serializable', Proc.new {}) # => TypeError +# +# Keys are always translated into Strings and are case sensitive. When an +# object is specified as a key and has a +cache_key+ method defined, this +# method will be called to define the key. Otherwise, the +to_param+ +# method will be called. Hashes and Arrays can also be used as keys. The +# elements will be delimited by slashes, and the elements within a Hash +# will be sorted by key so they are consistent. +# +# cache.read('city') == cache.read(:city) # => true +# +# Nil values can be cached. +# +# If your cache is on a shared infrastructure, you can define a namespace +# for your cache entries. If a namespace is defined, it will be prefixed on +# to every key. The namespace can be either a static value or a Proc. If it +# is a Proc, it will be invoked when each key is evaluated so that you can +# use application logic to invalidate keys. +# +# cache.namespace = -> { @last_mod_time } # Set the namespace to a variable +# @last_mod_time = Time.now # Invalidate the entire cache by changing namespace +# +# source://activesupport//lib/active_support/cache.rb#175 +class ActiveSupport::Cache::Store + # Creates a new cache. + # + # ==== Options + # + # * +:namespace+ - Sets the namespace for the cache. This option is + # especially useful if your application shares a cache with other + # applications. + # * +:coder+ - Replaces the default cache entry serialization mechanism + # with a custom one. The +coder+ must respond to +dump+ and +load+. + # Using a custom coder disables automatic compression. + # + # Any other specified options are treated as default options for the + # relevant cache operations, such as #read, #write, and #fetch. + # + # @return [Store] a new instance of Store + # + # source://activesupport//lib/active_support/cache.rb#211 + def initialize(options = T.unsafe(nil)); end + + # Cleans up the cache by removing expired entries. + # + # Options are passed to the underlying cache implementation. + # + # Some implementations may not support this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#582 + def cleanup(options = T.unsafe(nil)); end + + # Clears the entire cache. Be careful with this method since it could + # affect other processes if shared cache is being used. + # + # The options hash is passed to the underlying cache implementation. + # + # Some implementations may not support this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#592 + def clear(options = T.unsafe(nil)); end + + # Decrements an integer value in the cache. + # + # Options are passed to the underlying cache implementation. + # + # Some implementations may not support this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#573 + def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # Deletes an entry in the cache. Returns +true+ if an entry is deleted. + # + # Options are passed to the underlying cache implementation. + # + # source://activesupport//lib/active_support/cache.rb#514 + def delete(name, options = T.unsafe(nil)); end + + # Deletes all entries with keys matching the pattern. + # + # Options are passed to the underlying cache implementation. + # + # Some implementations may not support this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#555 + def delete_matched(matcher, options = T.unsafe(nil)); end + + # Deletes multiple entries in the cache. + # + # Options are passed to the underlying cache implementation. + # + # source://activesupport//lib/active_support/cache.rb#525 + def delete_multi(names, options = T.unsafe(nil)); end + + # Returns +true+ if the cache contains an entry for the given key. + # + # Options are passed to the underlying cache implementation. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache.rb#537 + def exist?(name, options = T.unsafe(nil)); end + + # Fetches data from the cache, using the given key. If there is data in + # the cache with the given key, then that data is returned. + # + # If there is no such data in the cache (a cache miss), then +nil+ will be + # returned. However, if a block has been passed, that block will be passed + # the key and executed in the event of a cache miss. The return value of the + # block will be written to the cache under the given cache key, and that + # return value will be returned. + # + # cache.write('today', 'Monday') + # cache.fetch('today') # => "Monday" + # + # cache.fetch('city') # => nil + # cache.fetch('city') do + # 'Duckburgh' + # end + # cache.fetch('city') # => "Duckburgh" + # + # ==== Options + # + # Internally, +fetch+ calls #read_entry, and calls #write_entry on a cache + # miss. Thus, +fetch+ supports the same options as #read and #write. + # Additionally, +fetch+ supports the following options: + # + # * force: true - Forces a cache "miss," meaning we treat the + # cache value as missing even if it's present. Passing a block is + # required when +force+ is true so this always results in a cache write. + # + # cache.write('today', 'Monday') + # cache.fetch('today', force: true) { 'Tuesday' } # => 'Tuesday' + # cache.fetch('today', force: true) # => ArgumentError + # + # The +:force+ option is useful when you're calling some other method to + # ask whether you should force a cache write. Otherwise, it's clearer to + # just call +write+. + # + # * skip_nil: true - Prevents caching a nil result: + # + # cache.fetch('foo') { nil } + # cache.fetch('bar', skip_nil: true) { nil } + # cache.exist?('foo') # => true + # cache.exist?('bar') # => false + # + # * +:race_condition_ttl+ - Specifies the number of seconds during which + # an expired value can be reused while a new value is being generated. + # This can be used to prevent race conditions when cache entries expire, + # by preventing multiple processes from simultaneously regenerating the + # same entry (also known as the dog pile effect). + # + # When a process encounters a cache entry that has expired less than + # +:race_condition_ttl+ seconds ago, it will bump the expiration time by + # +:race_condition_ttl+ seconds before generating a new value. During + # this extended time window, while the process generates a new value, + # other processes will continue to use the old value. After the first + # process writes the new value, other processes will then use it. + # + # If the first process errors out while generating a new value, another + # process can try to generate a new value after the extended time window + # has elapsed. + # + # # Set all values to expire after one minute. + # cache = ActiveSupport::Cache::MemoryStore.new(expires_in: 1.minute) + # + # cache.write('foo', 'original value') + # val_1 = nil + # val_2 = nil + # sleep 60 + # + # Thread.new do + # val_1 = cache.fetch('foo', race_condition_ttl: 10.seconds) do + # sleep 1 + # 'new value 1' + # end + # end + # + # Thread.new do + # val_2 = cache.fetch('foo', race_condition_ttl: 10.seconds) do + # 'new value 2' + # end + # end + # + # cache.fetch('foo') # => "original value" + # sleep 10 # First thread extended the life of cache by another 10 seconds + # cache.fetch('foo') # => "new value 1" + # val_1 # => "new value 1" + # val_2 # => "original value" + # + # source://activesupport//lib/active_support/cache.rb#321 + def fetch(name, options = T.unsafe(nil), &block); end + + # Fetches data from the cache, using the given keys. If there is data in + # the cache with the given keys, then that data is returned. Otherwise, + # the supplied block is called for each key for which there was no data, + # and the result will be written to the cache and returned. + # Therefore, you need to pass a block that returns the data to be written + # to the cache. If you do not want to write the cache when the cache is + # not found, use #read_multi. + # + # Returns a hash with the data for each of the names. For example: + # + # cache.write("bim", "bam") + # cache.fetch_multi("bim", "unknown_key") do |key| + # "Fallback value for key: #{key}" + # end + # # => { "bim" => "bam", + # # "unknown_key" => "Fallback value for key: unknown_key" } + # + # Options are passed to the underlying cache implementation. For example: + # + # cache.fetch_multi("fizz", expires_in: 5.seconds) do |key| + # "buzz" + # end + # # => {"fizz"=>"buzz"} + # cache.read("fizz") + # # => "buzz" + # sleep(6) + # cache.read("fizz") + # # => nil + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/cache.rb#447 + def fetch_multi(*names); end + + # Increments an integer value in the cache. + # + # Options are passed to the underlying cache implementation. + # + # Some implementations may not support this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#564 + def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache.rb#176 + def logger; end + + # source://activesupport//lib/active_support/cache.rb#176 + def logger=(val); end + + # Silences the logger within a block. + # + # source://activesupport//lib/active_support/cache.rb#227 + def mute; end + + # source://activesupport//lib/active_support/cache.rb#546 + def new_entry(value, options = T.unsafe(nil)); end + + # Returns the value of attribute options. + # + # source://activesupport//lib/active_support/cache.rb#178 + def options; end + + # Reads data from the cache, using the given key. If there is data in + # the cache with the given key, then that data is returned. Otherwise, + # +nil+ is returned. + # + # Note, if data was written with the :expires_in or + # :version options, both of these conditions are applied before + # the data is returned. + # + # ==== Options + # + # * +:version+ - Specifies a version for the cache entry. If the cached + # version does not match the requested version, the read will be treated + # as a cache miss. This feature is used to support recyclable cache keys. + # + # Other options will be handled by the specific cache store implementation. + # + # source://activesupport//lib/active_support/cache.rb#362 + def read(name, options = T.unsafe(nil)); end + + # Reads multiple values at once from the cache. Options can be passed + # in the last argument. + # + # Some cache implementation may optimize this method. + # + # Returns a hash mapping the names provided to the values found. + # + # source://activesupport//lib/active_support/cache.rb#395 + def read_multi(*names); end + + # Returns the value of attribute silence. + # + # source://activesupport//lib/active_support/cache.rb#178 + def silence; end + + # Silences the logger. + # + # source://activesupport//lib/active_support/cache.rb#221 + def silence!; end + + # Returns the value of attribute silence. + # + # source://activesupport//lib/active_support/cache.rb#178 + def silence?; end + + # Writes the value to the cache with the key. The value must be supported + # by the +coder+'s +dump+ and +load+ methods. + # + # By default, cache entries larger than 1kB are compressed. Compression + # allows more data to be stored in the same memory footprint, leading to + # fewer cache evictions and higher hit rates. + # + # ==== Options + # + # * compress: false - Disables compression of the cache entry. + # + # * +:compress_threshold+ - The compression threshold, specified in bytes. + # \Cache entries larger than this threshold will be compressed. Defaults + # to +1.kilobyte+. + # + # * +:expires_in+ - Sets a relative expiration time for the cache entry, + # specified in seconds. +:expire_in+ and +:expired_in+ are aliases for + # +:expires_in+. + # + # cache = ActiveSupport::Cache::MemoryStore.new(expires_in: 5.minutes) + # cache.write(key, value, expires_in: 1.minute) # Set a lower value for one entry + # + # * +:expires_at+ - Sets an absolute expiration time for the cache entry. + # + # cache = ActiveSupport::Cache::MemoryStore.new + # cache.write(key, value, expires_at: Time.now.at_end_of_hour) + # + # * +:version+ - Specifies a version for the cache entry. When reading + # from the cache, if the cached version does not match the requested + # version, the read will be treated as a cache miss. This feature is + # used to support recyclable cache keys. + # + # Other options will be handled by the specific cache store implementation. + # + # source://activesupport//lib/active_support/cache.rb#502 + def write(name, value, options = T.unsafe(nil)); end + + # Cache Storage API to write multiple values at once. + # + # source://activesupport//lib/active_support/cache.rb#407 + def write_multi(hash, options = T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/cache.rb#597 + def default_coder; end + + # Deletes an entry from the cache implementation. Subclasses must + # implement this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#674 + def delete_entry(key, **options); end + + # Deletes multiples entries in the cache implementation. Subclasses MAY + # implement this method. + # + # source://activesupport//lib/active_support/cache.rb#680 + def delete_multi_entries(entries, **options); end + + # source://activesupport//lib/active_support/cache.rb#641 + def deserialize_entry(payload); end + + # Expands key to be a consistent string value. Invokes +cache_key+ if + # object responds to +cache_key+. Otherwise, +to_param+ method will be + # called. If the key is a Hash, then keys will be sorted alphabetically. + # + # source://activesupport//lib/active_support/cache.rb#747 + def expanded_key(key); end + + # source://activesupport//lib/active_support/cache.rb#768 + def expanded_version(key); end + + # source://activesupport//lib/active_support/cache.rb#802 + def get_entry_value(entry, name, options); end + + # source://activesupport//lib/active_support/cache.rb#786 + def handle_expired_entry(entry, key, options); end + + # source://activesupport//lib/active_support/cache.rb#776 + def instrument(operation, key, options = T.unsafe(nil)); end + + # Adds the namespace defined in the options to a pattern designed to + # match keys. Implementations that support delete_matched should call + # this method to translate a pattern that matches names into one that + # matches namespaced keys. + # + # source://activesupport//lib/active_support/cache.rb#605 + def key_matcher(pattern, options); end + + # Merges the default options with ones specific to a method call. + # + # source://activesupport//lib/active_support/cache.rb#685 + def merged_options(call_options); end + + # Prefix the key with a namespace string: + # + # namespace_key 'foo', namespace: 'cache' + # # => 'cache:foo' + # + # With a namespace block: + # + # namespace_key 'foo', namespace: -> { 'cache' } + # # => 'cache:foo' + # + # source://activesupport//lib/active_support/cache.rb#725 + def namespace_key(key, options = T.unsafe(nil)); end + + # Expands and namespaces the cache key. May be overridden by + # cache stores to do additional normalization. + # + # source://activesupport//lib/active_support/cache.rb#712 + def normalize_key(key, options = T.unsafe(nil)); end + + # Normalize aliased options to their canonical form + # + # source://activesupport//lib/active_support/cache.rb#699 + def normalize_options(options); end + + # source://activesupport//lib/active_support/cache.rb#764 + def normalize_version(key, options = T.unsafe(nil)); end + + # Reads an entry from the cache implementation. Subclasses must implement + # this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#622 + def read_entry(key, **options); end + + # Reads multiple entries from the cache implementation. Subclasses MAY + # implement this method. + # + # source://activesupport//lib/active_support/cache.rb#647 + def read_multi_entries(names, **options); end + + # source://activesupport//lib/active_support/cache.rb#807 + def save_block_result_to_cache(name, options); end + + # source://activesupport//lib/active_support/cache.rb#632 + def serialize_entry(entry, **options); end + + # Writes an entry to the cache implementation. Subclasses must implement + # this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#628 + def write_entry(key, entry, **options); end + + # Writes multiple entries to the cache implementation. Subclasses MAY + # implement this method. + # + # source://activesupport//lib/active_support/cache.rb#666 + def write_multi_entries(hash, **options); end + + class << self + # source://activesupport//lib/active_support/cache.rb#176 + def logger; end + + # source://activesupport//lib/active_support/cache.rb#176 + def logger=(val); end + + private + + # source://activesupport//lib/active_support/cache.rb#190 + def ensure_connection_pool_added!; end + + # source://activesupport//lib/active_support/cache.rb#183 + def retrieve_pool_options(options); end + end +end + +# source://activesupport//lib/active_support/cache.rb#34 +module ActiveSupport::Cache::Strategy; end + +# Caches that implement LocalCache will be backed by an in-memory cache for the +# duration of a block. Repeated calls to the cache for the same key will hit the +# in-memory cache for faster access. +# +# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#11 +module ActiveSupport::Cache::Strategy::LocalCache + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#81 + def cleanup(**options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#75 + def clear(**options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#100 + def decrement(name, amount = T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#87 + def delete_matched(matcher, options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#93 + def increment(name, amount = T.unsafe(nil), **options); end + + # Middleware class can be inserted as a Rack handler to be local cache for the + # duration of request. + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#69 + def middleware; end + + # Use a local cache for the duration of block. + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#63 + def with_local_cache(&block); end + + private + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#170 + def bypass_local_cache(&block); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#147 + def delete_entry(key, **_arg1); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#166 + def local_cache; end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#162 + def local_cache_key; end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#122 + def read_multi_entries(keys, **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#108 + def read_serialized_entry(key, raw: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#174 + def use_temporary_local_cache(temporary_cache); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#152 + def write_cache_value(name, value, **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#138 + def write_serialized_entry(key, payload, **_arg2); end +end + +# Class for storing and registering the local caches. +# +# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#15 +module ActiveSupport::Cache::Strategy::LocalCache::LocalCacheRegistry + extend ::ActiveSupport::Cache::Strategy::LocalCache::LocalCacheRegistry + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#18 + def cache_for(local_cache_key); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#23 + def set_cache_for(local_cache_key, value); end +end + +# Simple memory backed cache. This cache is not thread safe and is intended only +# for serving as a temporary memory cache for a single thread. +# +# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#31 +class ActiveSupport::Cache::Strategy::LocalCache::LocalStore + # @return [LocalStore] a new instance of LocalStore + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#32 + def initialize; end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#36 + def clear(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#53 + def delete_entry(key); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#57 + def fetch_entry(key); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#40 + def read_entry(key); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#44 + def read_multi_entries(keys); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#48 + def write_entry(key, entry); end +end + +# -- +# This class wraps up local storage for middlewares. Only the middleware method should +# construct them. +# +# source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#13 +class ActiveSupport::Cache::Strategy::LocalCache::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#16 + def initialize(name, local_cache_key); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#27 + def call(env); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#14 + def local_cache_key; end + + # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#14 + def name; end + + # source://activesupport//lib/active_support/cache/strategy/local_cache_middleware.rb#22 + def new(app); end +end + +# These options mean something to all cache implementations. Individual cache +# implementations may support additional options. +# +# source://activesupport//lib/active_support/cache.rb#25 +ActiveSupport::Cache::UNIVERSAL_OPTIONS = T.let(T.unsafe(nil), Array) + +# CachingKeyGenerator is a wrapper around KeyGenerator which allows users to avoid +# re-executing the key generation process when it's called using the same +salt+ and +# +key_size+. +# +# source://activesupport//lib/active_support/key_generator.rb#47 +class ActiveSupport::CachingKeyGenerator + # @return [CachingKeyGenerator] a new instance of CachingKeyGenerator + # + # source://activesupport//lib/active_support/key_generator.rb#48 + def initialize(key_generator); end + + # Returns a derived key suitable for use. + # + # source://activesupport//lib/active_support/key_generator.rb#54 + def generate_key(*args); end +end + +# Callbacks are code hooks that are run at key points in an object's life cycle. +# The typical use case is to have a base class define a set of callbacks +# relevant to the other functionality it supplies, so that subclasses can +# install callbacks that enhance or modify the base functionality without +# needing to override or redefine methods of the base class. +# +# Mixing in this module allows you to define the events in the object's +# life cycle that will support callbacks (via ClassMethods#define_callbacks), +# set the instance methods, procs, or callback objects to be called (via +# ClassMethods#set_callback), and run the installed callbacks at the +# appropriate times (via +run_callbacks+). +# +# By default callbacks are halted by throwing +:abort+. +# See ClassMethods#define_callbacks for details. +# +# Three kinds of callbacks are supported: before callbacks, run before a +# certain event; after callbacks, run after the event; and around callbacks, +# blocks that surround the event, triggering it when they yield. Callback code +# can be contained in instance methods, procs or lambdas, or callback objects +# that respond to certain predetermined methods. See ClassMethods#set_callback +# for details. +# +# class Record +# include ActiveSupport::Callbacks +# define_callbacks :save +# +# def save +# run_callbacks :save do +# puts "- save" +# end +# end +# end +# +# class PersonRecord < Record +# set_callback :save, :before, :saving_message +# def saving_message +# puts "saving..." +# end +# +# set_callback :save, :after do |object| +# puts "saved" +# end +# end +# +# person = PersonRecord.new +# person.save +# +# Output: +# saving... +# - save +# saved +# +# source://activesupport//lib/active_support/callbacks.rb#63 +module ActiveSupport::Callbacks + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods + mixes_in_class_methods ::ActiveSupport::DescendantsTracker + + # Runs the callbacks for the given event. + # + # Calls the before and around callbacks in the order they were set, yields + # the block (if given one), and then runs the after callbacks in reverse + # order. + # + # If the callback chain was halted, returns +false+. Otherwise returns the + # result of the block, +nil+ if no callbacks have been set, or +true+ + # if callbacks have been set but no block is given. + # + # run_callbacks :save do + # save + # end + # + # -- + # + # As this method is used in many places, and often wraps large portions of + # user code, it has an additional design goal of minimizing its impact on + # the visible call stack. An exception from inside a :before or :after + # callback can be as noisy as it likes -- but when control has passed + # smoothly through and into the supplied block, we want as little evidence + # as possible that we were here. + # + # source://activesupport//lib/active_support/callbacks.rb#95 + def run_callbacks(kind); end + + private + + # A hook invoked every time a before callback is halted. + # This can be overridden in ActiveSupport::Callbacks implementors in order + # to provide better debugging/logging. + # + # source://activesupport//lib/active_support/callbacks.rb#147 + def halted_callback_hook(filter, name); end + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + def __callbacks?; end + end + + module GeneratedInstanceMethods + def __callbacks; end + def __callbacks?; end + end +end + +# source://activesupport//lib/active_support/callbacks.rb#71 +ActiveSupport::Callbacks::CALLBACK_FILTER_TYPES = T.let(T.unsafe(nil), Array) + +# A future invocation of user-supplied code (either as a callback, +# or a condition filter). +# +# source://activesupport//lib/active_support/callbacks.rb#375 +module ActiveSupport::Callbacks::CallTemplate + class << self + # Filters support: + # + # Symbols:: A method to call. + # Procs:: A proc to call with the object. + # Objects:: An object with a before_foo method on it to call. + # + # All of these objects are converted into a CallTemplate and handled + # the same after this point. + # + # source://activesupport//lib/active_support/callbacks.rb#533 + def build(filter, callback); end + end +end + +# source://activesupport//lib/active_support/callbacks.rb#434 +class ActiveSupport::Callbacks::CallTemplate::InstanceExec0 + # @return [InstanceExec0] a new instance of InstanceExec0 + # + # source://activesupport//lib/active_support/callbacks.rb#435 + def initialize(block); end + + # source://activesupport//lib/active_support/callbacks.rb#439 + def expand(target, value, block); end + + # source://activesupport//lib/active_support/callbacks.rb#449 + def inverted_lambda; end + + # source://activesupport//lib/active_support/callbacks.rb#443 + def make_lambda; end +end + +# source://activesupport//lib/active_support/callbacks.rb#456 +class ActiveSupport::Callbacks::CallTemplate::InstanceExec1 + # @return [InstanceExec1] a new instance of InstanceExec1 + # + # source://activesupport//lib/active_support/callbacks.rb#457 + def initialize(block); end + + # source://activesupport//lib/active_support/callbacks.rb#461 + def expand(target, value, block); end + + # source://activesupport//lib/active_support/callbacks.rb#471 + def inverted_lambda; end + + # source://activesupport//lib/active_support/callbacks.rb#465 + def make_lambda; end +end + +# source://activesupport//lib/active_support/callbacks.rb#478 +class ActiveSupport::Callbacks::CallTemplate::InstanceExec2 + # @return [InstanceExec2] a new instance of InstanceExec2 + # + # source://activesupport//lib/active_support/callbacks.rb#479 + def initialize(block); end + + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/callbacks.rb#483 + def expand(target, value, block); end + + # source://activesupport//lib/active_support/callbacks.rb#495 + def inverted_lambda; end + + # source://activesupport//lib/active_support/callbacks.rb#488 + def make_lambda; end +end + +# source://activesupport//lib/active_support/callbacks.rb#376 +class ActiveSupport::Callbacks::CallTemplate::MethodCall + # @return [MethodCall] a new instance of MethodCall + # + # source://activesupport//lib/active_support/callbacks.rb#377 + def initialize(method); end + + # Return the parts needed to make this call, with the given + # input values. + # + # Returns an array of the form: + # + # [target, block, method, *arguments] + # + # This array can be used as such: + # + # target.send(method, *arguments, &block) + # + # The actual invocation is left up to the caller to minimize + # call stack pollution. + # + # source://activesupport//lib/active_support/callbacks.rb#394 + def expand(target, value, block); end + + # source://activesupport//lib/active_support/callbacks.rb#404 + def inverted_lambda; end + + # source://activesupport//lib/active_support/callbacks.rb#398 + def make_lambda; end +end + +# source://activesupport//lib/active_support/callbacks.rb#411 +class ActiveSupport::Callbacks::CallTemplate::ObjectCall + # @return [ObjectCall] a new instance of ObjectCall + # + # source://activesupport//lib/active_support/callbacks.rb#412 + def initialize(target, method); end + + # source://activesupport//lib/active_support/callbacks.rb#417 + def expand(target, value, block); end + + # source://activesupport//lib/active_support/callbacks.rb#427 + def inverted_lambda; end + + # source://activesupport//lib/active_support/callbacks.rb#421 + def make_lambda; end +end + +# source://activesupport//lib/active_support/callbacks.rb#503 +class ActiveSupport::Callbacks::CallTemplate::ProcCall + # @return [ProcCall] a new instance of ProcCall + # + # source://activesupport//lib/active_support/callbacks.rb#504 + def initialize(target); end + + # source://activesupport//lib/active_support/callbacks.rb#508 + def expand(target, value, block); end + + # source://activesupport//lib/active_support/callbacks.rb#518 + def inverted_lambda; end + + # source://activesupport//lib/active_support/callbacks.rb#512 + def make_lambda; end +end + +# source://activesupport//lib/active_support/callbacks.rb#280 +class ActiveSupport::Callbacks::Callback + # @return [Callback] a new instance of Callback + # + # source://activesupport//lib/active_support/callbacks.rb#295 + def initialize(name, filter, kind, options, chain_config); end + + # Wraps code with filter + # + # source://activesupport//lib/active_support/callbacks.rb#330 + def apply(callback_sequence); end + + # Returns the value of attribute chain_config. + # + # source://activesupport//lib/active_support/callbacks.rb#293 + def chain_config; end + + # source://activesupport//lib/active_support/callbacks.rb#344 + def current_scopes; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#320 + def duplicates?(other); end + + # Returns the value of attribute filter. + # + # source://activesupport//lib/active_support/callbacks.rb#293 + def filter; end + + # Returns the value of attribute kind. + # + # source://activesupport//lib/active_support/callbacks.rb#292 + def kind; end + + # Sets the attribute kind + # + # @param value the value to set the attribute kind to. + # + # source://activesupport//lib/active_support/callbacks.rb#292 + def kind=(_arg0); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#316 + def matches?(_kind, _filter); end + + # source://activesupport//lib/active_support/callbacks.rb#304 + def merge_conditional_options(chain, if_option:, unless_option:); end + + # Returns the value of attribute name. + # + # source://activesupport//lib/active_support/callbacks.rb#292 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://activesupport//lib/active_support/callbacks.rb#292 + def name=(_arg0); end + + private + + # source://activesupport//lib/active_support/callbacks.rb#352 + def check_conditionals(conditionals); end + + # source://activesupport//lib/active_support/callbacks.rb#367 + def conditions_lambdas; end + + class << self + # source://activesupport//lib/active_support/callbacks.rb#281 + def build(chain, filter, kind, options); end + end +end + +# source://activesupport//lib/active_support/callbacks.rb#349 +ActiveSupport::Callbacks::Callback::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/callbacks.rb#603 +class ActiveSupport::Callbacks::CallbackChain + include ::Enumerable + + # @return [CallbackChain] a new instance of CallbackChain + # + # source://activesupport//lib/active_support/callbacks.rb#608 + def initialize(name, config); end + + # source://activesupport//lib/active_support/callbacks.rb#654 + def append(*callbacks); end + + # source://activesupport//lib/active_support/callbacks.rb#633 + def clear; end + + # source://activesupport//lib/active_support/callbacks.rb#645 + def compile; end + + # Returns the value of attribute config. + # + # source://activesupport//lib/active_support/callbacks.rb#606 + def config; end + + # source://activesupport//lib/active_support/callbacks.rb#628 + def delete(o); end + + # source://activesupport//lib/active_support/callbacks.rb#619 + def each(&block); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#621 + def empty?; end + + # source://activesupport//lib/active_support/callbacks.rb#620 + def index(o); end + + # source://activesupport//lib/active_support/callbacks.rb#623 + def insert(index, o); end + + # Returns the value of attribute name. + # + # source://activesupport//lib/active_support/callbacks.rb#606 + def name; end + + # source://activesupport//lib/active_support/callbacks.rb#658 + def prepend(*callbacks); end + + protected + + # Returns the value of attribute chain. + # + # source://activesupport//lib/active_support/callbacks.rb#663 + def chain; end + + private + + # source://activesupport//lib/active_support/callbacks.rb#666 + def append_one(callback); end + + # source://activesupport//lib/active_support/callbacks.rb#683 + def default_terminator; end + + # source://activesupport//lib/active_support/callbacks.rb#639 + def initialize_copy(other); end + + # source://activesupport//lib/active_support/callbacks.rb#672 + def prepend_one(callback); end + + # source://activesupport//lib/active_support/callbacks.rb#678 + def remove_duplicates(callback); end +end + +# Execute before and after filters in a sequence instead of +# chaining them with nested lambda calls, see: +# https://github.com/rails/rails/issues/18011 +# +# source://activesupport//lib/active_support/callbacks.rb#556 +class ActiveSupport::Callbacks::CallbackSequence + # @return [CallbackSequence] a new instance of CallbackSequence + # + # source://activesupport//lib/active_support/callbacks.rb#557 + def initialize(nested = T.unsafe(nil), call_template = T.unsafe(nil), user_conditions = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/callbacks.rb#571 + def after(&after); end + + # source://activesupport//lib/active_support/callbacks.rb#576 + def around(call_template, user_conditions); end + + # source://activesupport//lib/active_support/callbacks.rb#566 + def before(&before); end + + # source://activesupport//lib/active_support/callbacks.rb#590 + def expand_call_template(arg, block); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#586 + def final?; end + + # source://activesupport//lib/active_support/callbacks.rb#598 + def invoke_after(arg); end + + # source://activesupport//lib/active_support/callbacks.rb#594 + def invoke_before(arg); end + + # Returns the value of attribute nested. + # + # source://activesupport//lib/active_support/callbacks.rb#584 + def nested; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#580 + def skip?(arg); end +end + +# source://activesupport//lib/active_support/callbacks.rb#695 +module ActiveSupport::Callbacks::ClassMethods + # This is used internally to append, prepend and skip callbacks to the + # CallbackChain. + # + # source://activesupport//lib/active_support/callbacks.rb#705 + def __update_callbacks(name); end + + # Define sets of events in the object life cycle that support callbacks. + # + # define_callbacks :validate + # define_callbacks :initialize, :save, :destroy + # + # ===== Options + # + # * :terminator - Determines when a before filter will halt the + # callback chain, preventing following before and around callbacks from + # being called and the event from being triggered. + # This should be a lambda to be executed. + # The current object and the result lambda of the callback will be provided + # to the terminator lambda. + # + # define_callbacks :validate, terminator: ->(target, result_lambda) { result_lambda.call == false } + # + # In this example, if any before validate callbacks returns +false+, + # any successive before and around callback is not executed. + # + # The default terminator halts the chain when a callback throws +:abort+. + # + # * :skip_after_callbacks_if_terminated - Determines if after + # callbacks should be terminated by the :terminator option. By + # default after callbacks are executed no matter if callback chain was + # terminated or not. This option has no effect if :terminator + # option is set to +nil+. + # + # * :scope - Indicates which methods should be executed when an + # object is used as a callback. + # + # class Audit + # def before(caller) + # puts 'Audit: before is called' + # end + # + # def before_save(caller) + # puts 'Audit: before_save is called' + # end + # end + # + # class Account + # include ActiveSupport::Callbacks + # + # define_callbacks :save + # set_callback :save, :before, Audit.new + # + # def save + # run_callbacks :save do + # puts 'save in main' + # end + # end + # end + # + # In the above case whenever you save an account the method + # Audit#before will be called. On the other hand + # + # define_callbacks :save, scope: [:kind, :name] + # + # would trigger Audit#before_save instead. That's constructed + # by calling #{kind}_#{name} on the given instance. In this + # case "kind" is "before" and "name" is "save". In this context +:kind+ + # and +:name+ have special meanings: +:kind+ refers to the kind of + # callback (before/after/around) and +:name+ refers to the method on + # which callbacks are being defined. + # + # A declaration like + # + # define_callbacks :save, scope: [:name] + # + # would call Audit#save. + # + # ===== Notes + # + # +names+ passed to +define_callbacks+ must not end with + # !, ? or =. + # + # Calling +define_callbacks+ multiple times with the same +names+ will + # overwrite previous callbacks registered with +set_callback+. + # + # source://activesupport//lib/active_support/callbacks.rb#917 + def define_callbacks(*names); end + + # source://activesupport//lib/active_support/callbacks.rb#696 + def normalize_callback_params(filters, block); end + + # Remove all set callbacks for the given event. + # + # source://activesupport//lib/active_support/callbacks.rb#827 + def reset_callbacks(name); end + + # Install a callback for the given event. + # + # set_callback :save, :before, :before_method + # set_callback :save, :after, :after_method, if: :condition + # set_callback :save, :around, ->(r, block) { stuff; result = block.call; stuff } + # + # The second argument indicates whether the callback is to be run +:before+, + # +:after+, or +:around+ the event. If omitted, +:before+ is assumed. This + # means the first example above can also be written as: + # + # set_callback :save, :before_method + # + # The callback can be specified as a symbol naming an instance method; as a + # proc, lambda, or block; or as an object that responds to a certain method + # determined by the :scope argument to +define_callbacks+. + # + # If a proc, lambda, or block is given, its body is evaluated in the context + # of the current object. It can also optionally accept the current object as + # an argument. + # + # Before and around callbacks are called in the order that they are set; + # after callbacks are called in the reverse order. + # + # Around callbacks can access the return value from the event, if it + # wasn't halted, from the +yield+ call. + # + # ===== Options + # + # * :if - A symbol or an array of symbols, each naming an instance + # method or a proc; the callback will be called only when they all return + # a true value. + # + # If a proc is given, its body is evaluated in the context of the + # current object. It can also optionally accept the current object as + # an argument. + # * :unless - A symbol or an array of symbols, each naming an + # instance method or a proc; the callback will be called only when they + # all return a false value. + # + # If a proc is given, its body is evaluated in the context of the + # current object. It can also optionally accept the current object as + # an argument. + # * :prepend - If +true+, the callback will be prepended to the + # existing chain rather than appended. + # + # source://activesupport//lib/active_support/callbacks.rb#756 + def set_callback(name, *filter_list, &block); end + + # Skip a previously set callback. Like +set_callback+, :if or + # :unless options may be passed in order to control when the + # callback is skipped. + # + # class Writer < PersonRecord + # attr_accessor :age + # skip_callback :save, :before, :saving_message, if: -> { age > 18 } + # end + # + # When if option returns true, callback is skipped. + # + # writer = Writer.new + # writer.age = 20 + # writer.save + # + # Output: + # - save + # saved + # + # When if option returns false, callback is NOT skipped. + # + # young_writer = Writer.new + # young_writer.age = 17 + # young_writer.save + # + # Output: + # saving... + # - save + # saved + # + # An ArgumentError will be raised if the callback has not + # already been set (unless the :raise option is set to false). + # + # source://activesupport//lib/active_support/callbacks.rb#802 + def skip_callback(name, *filter_list, &block); end + + protected + + # source://activesupport//lib/active_support/callbacks.rb#948 + def get_callbacks(name); end + + # source://activesupport//lib/active_support/callbacks.rb#952 + def set_callbacks(name, callbacks); end +end + +# source://activesupport//lib/active_support/callbacks.rb#150 +module ActiveSupport::Callbacks::Conditionals; end + +# source://activesupport//lib/active_support/callbacks.rb#151 +class ActiveSupport::Callbacks::Conditionals::Value + # @return [Value] a new instance of Value + # + # source://activesupport//lib/active_support/callbacks.rb#152 + def initialize(&block); end + + # source://activesupport//lib/active_support/callbacks.rb#155 + def call(target, value); end +end + +# source://activesupport//lib/active_support/callbacks.rb#159 +module ActiveSupport::Callbacks::Filters; end + +# source://activesupport//lib/active_support/callbacks.rb#212 +class ActiveSupport::Callbacks::Filters::After + class << self + # source://activesupport//lib/active_support/callbacks.rb#213 + def build(callback_sequence, user_callback, user_conditions, chain_config); end + + private + + # source://activesupport//lib/active_support/callbacks.rb#255 + def conditional(callback_sequence, user_callback, user_conditions); end + + # source://activesupport//lib/active_support/callbacks.rb#244 + def halting(callback_sequence, user_callback); end + + # source://activesupport//lib/active_support/callbacks.rb#229 + def halting_and_conditional(callback_sequence, user_callback, user_conditions); end + + # source://activesupport//lib/active_support/callbacks.rb#269 + def simple(callback_sequence, user_callback); end + end +end + +# source://activesupport//lib/active_support/callbacks.rb#162 +class ActiveSupport::Callbacks::Filters::Before + class << self + # source://activesupport//lib/active_support/callbacks.rb#163 + def build(callback_sequence, user_callback, user_conditions, chain_config, filter, name); end + + private + + # source://activesupport//lib/active_support/callbacks.rb#192 + def halting(callback_sequence, user_callback, halted_lambda, filter, name); end + + # source://activesupport//lib/active_support/callbacks.rb#173 + def halting_and_conditional(callback_sequence, user_callback, user_conditions, halted_lambda, filter, name); end + end +end + +# source://activesupport//lib/active_support/callbacks.rb#160 +class ActiveSupport::Callbacks::Filters::Environment < ::Struct + # Returns the value of attribute halted + # + # @return [Object] the current value of halted + def halted; end + + # Sets the attribute halted + # + # @param value [Object] the value to set the attribute halted to. + # @return [Object] the newly set value + def halted=(_); end + + # Returns the value of attribute target + # + # @return [Object] the current value of target + def target; end + + # Sets the attribute target + # + # @param value [Object] the value to set the attribute target to. + # @return [Object] the newly set value + def target=(_); end + + # Returns the value of attribute value + # + # @return [Object] the current value of value + def value; end + + # Sets the attribute value + # + # @param value [Object] the value to set the attribute value to. + # @return [Object] the newly set value + def value=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://activesupport//lib/active_support/code_generator.rb#4 +class ActiveSupport::CodeGenerator + # @return [CodeGenerator] a new instance of CodeGenerator + # + # source://activesupport//lib/active_support/code_generator.rb#48 + def initialize(owner, path, line); end + + # source://activesupport//lib/active_support/code_generator.rb#55 + def define_cached_method(name, namespace:, as: T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/code_generator.rb#59 + def execute; end + + class << self + # source://activesupport//lib/active_support/code_generator.rb#36 + def batch(owner, path, line); end + end +end + +# source://activesupport//lib/active_support/code_generator.rb#5 +class ActiveSupport::CodeGenerator::MethodSet + # @return [MethodSet] a new instance of MethodSet + # + # source://activesupport//lib/active_support/code_generator.rb#8 + def initialize(namespace); end + + # source://activesupport//lib/active_support/code_generator.rb#25 + def apply(owner, path, line); end + + # source://activesupport//lib/active_support/code_generator.rb#14 + def define_cached_method(name, as: T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/code_generator.rb#6 +ActiveSupport::CodeGenerator::MethodSet::METHOD_CACHES = T.let(T.unsafe(nil), Hash) + +# A typical module looks like this: +# +# module M +# def self.included(base) +# base.extend ClassMethods +# base.class_eval do +# scope :disabled, -> { where(disabled: true) } +# end +# end +# +# module ClassMethods +# ... +# end +# end +# +# By using ActiveSupport::Concern the above module could instead be +# written as: +# +# require "active_support/concern" +# +# module M +# extend ActiveSupport::Concern +# +# included do +# scope :disabled, -> { where(disabled: true) } +# end +# +# class_methods do +# ... +# end +# end +# +# Moreover, it gracefully handles module dependencies. Given a +Foo+ module +# and a +Bar+ module which depends on the former, we would typically write the +# following: +# +# module Foo +# def self.included(base) +# base.class_eval do +# def self.method_injected_by_foo +# ... +# end +# end +# end +# end +# +# module Bar +# def self.included(base) +# base.method_injected_by_foo +# end +# end +# +# class Host +# include Foo # We need to include this dependency for Bar +# include Bar # Bar is the module that Host really needs +# end +# +# But why should +Host+ care about +Bar+'s dependencies, namely +Foo+? We +# could try to hide these from +Host+ directly including +Foo+ in +Bar+: +# +# module Bar +# include Foo +# def self.included(base) +# base.method_injected_by_foo +# end +# end +# +# class Host +# include Bar +# end +# +# Unfortunately this won't work, since when +Foo+ is included, its base +# is the +Bar+ module, not the +Host+ class. With ActiveSupport::Concern, +# module dependencies are properly resolved: +# +# require "active_support/concern" +# +# module Foo +# extend ActiveSupport::Concern +# included do +# def self.method_injected_by_foo +# ... +# end +# end +# end +# +# module Bar +# extend ActiveSupport::Concern +# include Foo +# +# included do +# self.method_injected_by_foo +# end +# end +# +# class Host +# include Bar # It works, now Bar takes care of its dependencies +# end +# +# === Prepending concerns +# +# Just like include, concerns also support prepend with a corresponding +# prepended do callback. module ClassMethods or class_methods do are +# prepended as well. +# +# prepend is also used for any dependencies. +# +# source://activesupport//lib/active_support/concern.rb#110 +module ActiveSupport::Concern + # source://activesupport//lib/active_support/concern.rb#127 + def append_features(base); end + + # Define class methods from given block. + # You can define private class methods as well. + # + # module Example + # extend ActiveSupport::Concern + # + # class_methods do + # def foo; puts 'foo'; end + # + # private + # def bar; puts 'bar'; end + # end + # end + # + # class Buzz + # include Example + # end + # + # Buzz.foo # => "foo" + # Buzz.bar # => private method 'bar' called for Buzz:Class(NoMethodError) + # + # source://activesupport//lib/active_support/concern.rb#207 + def class_methods(&class_methods_module_definition); end + + # Evaluate given block in context of base class, + # so that you can write class macros here. + # When you define more than one +included+ block, it raises an exception. + # + # source://activesupport//lib/active_support/concern.rb#156 + def included(base = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/concern.rb#140 + def prepend_features(base); end + + # Evaluate given block in context of base class, + # so that you can write class macros here. + # When you define more than one +prepended+ block, it raises an exception. + # + # source://activesupport//lib/active_support/concern.rb#173 + def prepended(base = T.unsafe(nil), &block); end + + class << self + # source://activesupport//lib/active_support/concern.rb#123 + def extended(base); end + end +end + +# source://activesupport//lib/active_support/concern.rb#111 +class ActiveSupport::Concern::MultipleIncludedBlocks < ::StandardError + # @return [MultipleIncludedBlocks] a new instance of MultipleIncludedBlocks + # + # source://activesupport//lib/active_support/concern.rb#112 + def initialize; end +end + +# source://activesupport//lib/active_support/concern.rb#117 +class ActiveSupport::Concern::MultiplePrependBlocks < ::StandardError + # @return [MultiplePrependBlocks] a new instance of MultiplePrependBlocks + # + # source://activesupport//lib/active_support/concern.rb#118 + def initialize; end +end + +# source://activesupport//lib/active_support/concurrency/share_lock.rb#7 +module ActiveSupport::Concurrency; end + +# A share/exclusive lock, otherwise known as a read/write lock. +# +# https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock +# +# source://activesupport//lib/active_support/concurrency/share_lock.rb#11 +class ActiveSupport::Concurrency::ShareLock + include ::MonitorMixin + + # @return [ShareLock] a new instance of ShareLock + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#50 + def initialize; end + + # Execute the supplied block while holding the Exclusive lock. If + # +no_wait+ is set and the lock is not immediately available, + # returns +nil+ without yielding. Otherwise, returns the result of + # the block. + # + # See +start_exclusive+ for other options. + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#148 + def exclusive(purpose: T.unsafe(nil), compatible: T.unsafe(nil), after_compatible: T.unsafe(nil), no_wait: T.unsafe(nil)); end + + # We track Thread objects, instead of just using counters, because + # we need exclusive locks to be reentrant, and we need to be able + # to upgrade share locks to exclusive. + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#18 + def raw_state; end + + # Execute the supplied block while holding the Share lock. + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#159 + def sharing; end + + # Returns false if +no_wait+ is set and the lock is not + # immediately available. Otherwise, returns true after the lock + # has been acquired. + # + # +purpose+ and +compatible+ work together; while this thread is + # waiting for the exclusive lock, it will yield its share (if any) + # to any other attempt whose +purpose+ appears in this attempt's + # +compatible+ list. This allows a "loose" upgrade, which, being + # less strict, prevents some classes of deadlocks. + # + # For many resources, loose upgrades are sufficient: if a thread + # is awaiting a lock, it is not running any other code. With + # +purpose+ matching, it is possible to yield only to other + # threads whose activity will not interfere. + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#76 + def start_exclusive(purpose: T.unsafe(nil), compatible: T.unsafe(nil), no_wait: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/concurrency/share_lock.rb#114 + def start_sharing; end + + # Relinquish the exclusive lock. Must only be called by the thread + # that called start_exclusive (and currently holds the lock). + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#96 + def stop_exclusive(compatible: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/concurrency/share_lock.rb#131 + def stop_sharing; end + + # Temporarily give up all held Share locks while executing the + # supplied block, allowing any +compatible+ exclusive lock request + # to proceed. + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#171 + def yield_shares(purpose: T.unsafe(nil), compatible: T.unsafe(nil), block_share: T.unsafe(nil)); end + + private + + # Must be called within synchronize + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#204 + def busy_for_exclusive?(purpose); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#209 + def busy_for_sharing?(purpose); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#214 + def eligible_waiters?(compatible); end + + # source://activesupport//lib/active_support/concurrency/share_lock.rb#218 + def wait_for(method, &block); end +end + +# Configurable provides a config method to store and retrieve +# configuration options as an OrderedOptions. +# +# source://activesupport//lib/active_support/configurable.rb#9 +module ActiveSupport::Configurable + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActiveSupport::Configurable::ClassMethods + + # Reads and writes attributes from a configuration OrderedOptions. + # + # require "active_support/configurable" + # + # class User + # include ActiveSupport::Configurable + # end + # + # user = User.new + # + # user.config.allowed_access = true + # user.config.level = 1 + # + # user.config.allowed_access # => true + # user.config.level # => 1 + # + # source://activesupport//lib/active_support/configurable.rb#145 + def config; end +end + +# source://activesupport//lib/active_support/configurable.rb#27 +module ActiveSupport::Configurable::ClassMethods + # source://activesupport//lib/active_support/configurable.rb#28 + def config; end + + # @yield [config] + # + # source://activesupport//lib/active_support/configurable.rb#37 + def configure; end + + private + + # Allows you to add shortcut so that you don't have to refer to attribute + # through config. Also look at the example for config to contrast. + # + # Defines both class and instance config accessors. + # + # class User + # include ActiveSupport::Configurable + # config_accessor :allowed_access + # end + # + # User.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#109 + def config_accessor(*names, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/configurable.rb#12 +class ActiveSupport::Configurable::Configuration < ::ActiveSupport::InheritableOptions + # source://activesupport//lib/active_support/configurable.rb#13 + def compile_methods!; end + + class << self + # Compiles reader methods so we don't have to go through method_missing. + # + # source://activesupport//lib/active_support/configurable.rb#18 + def compile_methods!(keys); end + end +end + +# Reads a YAML configuration file, evaluating any ERB, then +# parsing the resulting YAML. +# +# Warns in case of YAML confusing characters, like invisible +# non-breaking spaces. +# +# source://activesupport//lib/active_support/configuration_file.rb#9 +class ActiveSupport::ConfigurationFile + # @return [ConfigurationFile] a new instance of ConfigurationFile + # + # source://activesupport//lib/active_support/configuration_file.rb#12 + def initialize(content_path); end + + # source://activesupport//lib/active_support/configuration_file.rb#21 + def parse(context: T.unsafe(nil), **options); end + + private + + # source://activesupport//lib/active_support/configuration_file.rb#35 + def read(content_path); end + + # source://activesupport//lib/active_support/configuration_file.rb#46 + def render(context); end + + class << self + # source://activesupport//lib/active_support/configuration_file.rb#17 + def parse(content_path, **options); end + end +end + +# source://activesupport//lib/active_support/configuration_file.rb#10 +class ActiveSupport::ConfigurationFile::FormatError < ::StandardError; end + +# Abstract super class that provides a thread-isolated attributes singleton, which resets automatically +# before and after each request. This allows you to keep all the per-request attributes easily +# available to the whole system. +# +# The following full app-like example demonstrates how to use a Current class to +# facilitate easy access to the global, per-request attributes without passing them deeply +# around everywhere: +# +# # app/models/current.rb +# class Current < ActiveSupport::CurrentAttributes +# attribute :account, :user +# attribute :request_id, :user_agent, :ip_address +# +# resets { Time.zone = nil } +# +# def user=(user) +# super +# self.account = user.account +# Time.zone = user.time_zone +# end +# end +# +# # app/controllers/concerns/authentication.rb +# module Authentication +# extend ActiveSupport::Concern +# +# included do +# before_action :authenticate +# end +# +# private +# def authenticate +# if authenticated_user = User.find_by(id: cookies.encrypted[:user_id]) +# Current.user = authenticated_user +# else +# redirect_to new_session_url +# end +# end +# end +# +# # app/controllers/concerns/set_current_request_details.rb +# module SetCurrentRequestDetails +# extend ActiveSupport::Concern +# +# included do +# before_action do +# Current.request_id = request.uuid +# Current.user_agent = request.user_agent +# Current.ip_address = request.ip +# end +# end +# end +# +# class ApplicationController < ActionController::Base +# include Authentication +# include SetCurrentRequestDetails +# end +# +# class MessagesController < ApplicationController +# def create +# Current.account.messages.create(message_params) +# end +# end +# +# class Message < ApplicationRecord +# belongs_to :creator, default: -> { Current.user } +# after_create { |message| Event.create(record: message) } +# end +# +# class Event < ApplicationRecord +# before_create do +# self.request_id = Current.request_id +# self.user_agent = Current.user_agent +# self.ip_address = Current.ip_address +# end +# end +# +# A word of caution: It's easy to overdo a global singleton like Current and tangle your model as a result. +# Current should only be used for a few, top-level globals, like account, user, and request details. +# The attributes stuck in Current should be used by more or less all actions on all requests. If you start +# sticking controller-specific attributes in there, you're going to create a mess. +# +# source://activesupport//lib/active_support/current_attributes.rb#89 +class ActiveSupport::CurrentAttributes + include ::ActiveSupport::Callbacks + extend ::ActiveSupport::Callbacks::ClassMethods + extend ::ActiveSupport::DescendantsTracker + + # @return [CurrentAttributes] a new instance of CurrentAttributes + # + # source://activesupport//lib/active_support/current_attributes.rb#188 + def initialize; end + + # source://activesupport//lib/active_support/callbacks.rb#68 + def __callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#68 + def __callbacks?; end + + # source://activesupport//lib/active_support/callbacks.rb#940 + def _reset_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#928 + def _run_reset_callbacks(&block); end + + # Returns the value of attribute attributes. + # + # source://activesupport//lib/active_support/current_attributes.rb#186 + def attributes; end + + # Sets the attribute attributes + # + # @param value the value to set the attribute attributes to. + # + # source://activesupport//lib/active_support/current_attributes.rb#186 + def attributes=(_arg0); end + + # Reset all attributes. Should be called before and after actions, when used as a per-request singleton. + # + # source://activesupport//lib/active_support/current_attributes.rb#211 + def reset; end + + # Expose one or more attributes within a block. Old values are returned after the block concludes. + # Example demonstrating the common use of needing to set Current attributes outside the request-cycle: + # + # class Chat::PublicationJob < ApplicationJob + # def perform(attributes, room_number, creator) + # Current.set(person: creator) do + # Chat::Publisher.publish(attributes: attributes, room_number: room_number) + # end + # end + # end + # + # source://activesupport//lib/active_support/current_attributes.rb#202 + def set(set_attributes); end + + private + + # source://activesupport//lib/active_support/current_attributes.rb#218 + def assign_attributes(new_attributes); end + + # source://activesupport//lib/active_support/current_attributes.rb#222 + def compute_attributes(keys); end + + class << self + # source://activesupport//lib/active_support/callbacks.rb#68 + def __callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#68 + def __callbacks=(value); end + + # source://activesupport//lib/active_support/callbacks.rb#68 + def __callbacks?; end + + # source://activesupport//lib/active_support/callbacks.rb#932 + def _reset_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#936 + def _reset_callbacks=(value); end + + # Calls this block after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. + # + # source://activesupport//lib/active_support/current_attributes.rb#142 + def after_reset(&block); end + + # Declares one or more attributes that will be given both class and instance accessor methods. + # + # source://activesupport//lib/active_support/current_attributes.rb#100 + def attribute(*names); end + + # Calls this block before #reset is called on the instance. Used for resetting external collaborators that depend on current values. + # + # source://activesupport//lib/active_support/current_attributes.rb#137 + def before_reset(&block); end + + # source://activesupport//lib/active_support/current_attributes.rb#153 + def clear_all; end + + # Returns singleton instance for this class in this thread. If none exists, one is created. + # + # source://activesupport//lib/active_support/current_attributes.rb#95 + def instance; end + + # source://activesupport//lib/active_support/current_attributes.rb#147 + def reset(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/current_attributes.rb#149 + def reset_all; end + + # Calls this block after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. + # + # source://activesupport//lib/active_support/current_attributes.rb#142 + def resets(&block); end + + # source://activesupport//lib/active_support/current_attributes.rb#147 + def set(*_arg0, **_arg1, &_arg2); end + + private + + # source://activesupport//lib/active_support/current_attributes.rb#163 + def current_instances; end + + # source://activesupport//lib/active_support/current_attributes.rb#167 + def current_instances_key; end + + # source://activesupport//lib/active_support/current_attributes.rb#159 + def generated_attribute_methods; end + + # source://activesupport//lib/active_support/current_attributes.rb#171 + def method_missing(name, *args, **_arg2, &block); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/current_attributes.rb#181 + def respond_to_missing?(name, _); end + end +end + +# source://activesupport//lib/active_support/dependencies/interlock.rb#6 +module ActiveSupport::Dependencies + class << self + # source://activesupport//lib/active_support/dependencies.rb#62 + def _autoloaded_tracked_classes; end + + # source://activesupport//lib/active_support/dependencies.rb#62 + def _autoloaded_tracked_classes=(_arg0); end + + # source://activesupport//lib/active_support/dependencies.rb#56 + def _eager_load_paths; end + + # source://activesupport//lib/active_support/dependencies.rb#56 + def _eager_load_paths=(_arg0); end + + # source://activesupport//lib/active_support/dependencies.rb#49 + def autoload_once_paths; end + + # source://activesupport//lib/active_support/dependencies.rb#49 + def autoload_once_paths=(_arg0); end + + # source://activesupport//lib/active_support/dependencies.rb#43 + def autoload_paths; end + + # source://activesupport//lib/active_support/dependencies.rb#43 + def autoload_paths=(_arg0); end + + # source://activesupport//lib/active_support/dependencies.rb#69 + def autoloader; end + + # source://activesupport//lib/active_support/dependencies.rb#69 + def autoloader=(_arg0); end + + # Private method that reloads constants autoloaded by the main autoloader. + # + # Rails.application.reloader.reload! is the public interface for application + # reload. That involves more things, like deleting unloaded classes from the + # internal state of the descendants tracker, or reloading routes. + # + # source://activesupport//lib/active_support/dependencies.rb#76 + def clear; end + + # Private method that helps configuring the autoloaders. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/dependencies.rb#94 + def eager_load?(path); end + + # source://activesupport//lib/active_support/dependencies.rb#10 + def interlock; end + + # source://activesupport//lib/active_support/dependencies.rb#10 + def interlock=(_arg0); end + + # Execute the supplied block while holding an exclusive lock, + # preventing any other thread from being inside a #run_interlock + # block at the same time. + # + # source://activesupport//lib/active_support/dependencies.rb#24 + def load_interlock(&block); end + + # Execute the supplied block without interference from any + # concurrent loads. + # + # source://activesupport//lib/active_support/dependencies.rb#17 + def run_interlock(&block); end + + # Private method used by require_dependency. + # + # source://activesupport//lib/active_support/dependencies.rb#84 + def search_for_file(relpath); end + + # Execute the supplied block while holding an exclusive lock, + # preventing any other thread from being inside a #run_interlock + # block at the same time. + # + # source://activesupport//lib/active_support/dependencies.rb#31 + def unload_interlock(&block); end + end +end + +# source://activesupport//lib/active_support/dependencies/interlock.rb#7 +class ActiveSupport::Dependencies::Interlock + # @return [Interlock] a new instance of Interlock + # + # source://activesupport//lib/active_support/dependencies/interlock.rb#8 + def initialize; end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#32 + def done_running; end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#24 + def done_unloading; end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#12 + def loading(&block); end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#40 + def permit_concurrent_loads(&block); end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#44 + def raw_state(&block); end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#36 + def running(&block); end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#28 + def start_running; end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#20 + def start_unloading; end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#16 + def unloading(&block); end +end + +# source://activesupport//lib/active_support/dependencies/require_dependency.rb#3 +module ActiveSupport::Dependencies::RequireDependency + # Warning: This method is obsolete. The semantics of the autoloader + # match Ruby's and you do not need to be defensive with load order anymore. + # Just refer to classes and modules normally. + # + # Engines that do not control the mode in which their parent application runs + # should call +require_dependency+ where needed in case the runtime mode is + # +:classic+. + # + # source://activesupport//lib/active_support/dependencies/require_dependency.rb#11 + def require_dependency(filename); end +end + +# \Deprecation specifies the API used by Rails to deprecate methods, instance +# variables, objects, and constants. +# +# source://activesupport//lib/active_support/deprecation.rb#8 +class ActiveSupport::Deprecation + include ::Singleton + include ::ActiveSupport::Deprecation::InstanceDelegator + include ::ActiveSupport::Deprecation::Behavior + include ::ActiveSupport::Deprecation::Reporting + include ::ActiveSupport::Deprecation::Disallowed + include ::ActiveSupport::Deprecation::MethodWrapper + extend ::Singleton::SingletonClassMethods + extend ::ActiveSupport::Deprecation::InstanceDelegator::ClassMethods + extend ::ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators + + # It accepts two parameters on initialization. The first is a version of library + # and the second is a library name. + # + # ActiveSupport::Deprecation.new('2.0', 'MyLibrary') + # + # @return [Deprecation] a new instance of Deprecation + # + # source://activesupport//lib/active_support/deprecation.rb#41 + def initialize(deprecation_horizon = T.unsafe(nil), gem_name = T.unsafe(nil)); end + + # The version number in which the deprecated behavior will be removed, by default. + # + # source://activesupport//lib/active_support/deprecation.rb#35 + def deprecation_horizon; end + + # The version number in which the deprecated behavior will be removed, by default. + # + # source://activesupport//lib/active_support/deprecation.rb#35 + def deprecation_horizon=(_arg0); end + + class << self + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def allow(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def behavior(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def behavior=(arg); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def debug(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def debug=(arg); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def deprecate_methods(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def deprecation_horizon(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def deprecation_horizon=(arg); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#31 + def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def disallowed_behavior(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def disallowed_behavior=(arg); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def disallowed_warnings(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def disallowed_warnings=(arg); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def gem_name(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def gem_name=(arg); end + + def new(*_arg0); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def silence(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def silenced(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#21 + def silenced=(arg); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#26 + def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end + + private + + def allocate; end + end +end + +# Behavior module allows to determine how to display deprecation messages. +# You can create a custom behavior or set any from the +DEFAULT_BEHAVIORS+ +# constant. Available behaviors are: +# +# [+raise+] Raise ActiveSupport::DeprecationException. +# [+stderr+] Log all deprecation warnings to $stderr. +# [+log+] Log all deprecation warnings to +Rails.logger+. +# [+notify+] Use +ActiveSupport::Notifications+ to notify +deprecation.rails+. +# [+silence+] Do nothing. On Rails, set config.active_support.report_deprecations = false to disable all behaviors. +# +# Setting behaviors only affects deprecations that happen after boot time. +# For more information you can read the documentation of the +behavior=+ method. +# +# source://activesupport//lib/active_support/deprecation/behaviors.rb#61 +module ActiveSupport::Deprecation::Behavior + # Returns the current behavior or if one isn't set, defaults to +:stderr+. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#66 + def behavior; end + + # Sets the behavior to the specified value. Can be a single value, array, + # or an object that responds to +call+. + # + # Available behaviors: + # + # [+raise+] Raise ActiveSupport::DeprecationException. + # [+stderr+] Log all deprecation warnings to $stderr. + # [+log+] Log all deprecation warnings to +Rails.logger+. + # [+notify+] Use +ActiveSupport::Notifications+ to notify +deprecation.rails+. + # [+silence+] Do nothing. + # + # Setting behaviors only affects deprecations that happen after boot time. + # Deprecation warnings raised by gems are not affected by this setting + # because they happen before Rails boots up. + # + # ActiveSupport::Deprecation.behavior = :stderr + # ActiveSupport::Deprecation.behavior = [:stderr, :log] + # ActiveSupport::Deprecation.behavior = MyCustomHandler + # ActiveSupport::Deprecation.behavior = ->(message, callstack, deprecation_horizon, gem_name) { + # # custom stuff + # } + # + # If you are using Rails, you can set config.active_support.report_deprecations = false to disable + # all deprecation behaviors. This is similar to the +silence+ option but more performant. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#99 + def behavior=(behavior); end + + # Whether to print a backtrace along with the warning. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#63 + def debug; end + + # Whether to print a backtrace along with the warning. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#63 + def debug=(_arg0); end + + # Returns the current behavior for disallowed deprecations or if one isn't set, defaults to +:raise+. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#71 + def disallowed_behavior; end + + # Sets the behavior for disallowed deprecations (those configured by + # ActiveSupport::Deprecation.disallowed_warnings=) to the specified + # value. As with +behavior=+, this can be a single value, array, or an + # object that responds to +call+. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#107 + def disallowed_behavior=(behavior); end + + private + + # source://activesupport//lib/active_support/deprecation/behaviors.rb#112 + def arity_coerce(behavior); end +end + +# Default warning behaviors per Rails.env. +# +# source://activesupport//lib/active_support/deprecation/behaviors.rb#13 +ActiveSupport::Deprecation::DEFAULT_BEHAVIORS = T.let(T.unsafe(nil), Hash) + +# DeprecatedConstantAccessor transforms a constant into a deprecated one by +# hooking +const_missing+. +# +# It takes the names of an old (deprecated) constant and of a new constant +# (both in string form) and optionally a deprecator. The deprecator defaults +# to +ActiveSupport::Deprecator+ if none is specified. +# +# The deprecated constant now returns the same object as the new one rather +# than a proxy object, so it can be used transparently in +rescue+ blocks +# etc. +# +# PLANETS = %w(mercury venus earth mars jupiter saturn uranus neptune pluto) +# +# # (In a later update, the original implementation of `PLANETS` has been removed.) +# +# PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) +# include ActiveSupport::Deprecation::DeprecatedConstantAccessor +# deprecate_constant 'PLANETS', 'PLANETS_POST_2006' +# +# PLANETS.map { |planet| planet.capitalize } +# # => DEPRECATION WARNING: PLANETS is deprecated! Use PLANETS_POST_2006 instead. +# (Backtrace information…) +# ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"] +# +# source://activesupport//lib/active_support/deprecation/constant_accessor.rb#28 +module ActiveSupport::Deprecation::DeprecatedConstantAccessor + class << self + # @private + # + # source://activesupport//lib/active_support/deprecation/constant_accessor.rb#29 + def included(base); end + end +end + +# DeprecatedConstantProxy transforms a constant into a deprecated one. It +# takes the names of an old (deprecated) constant and of a new constant +# (both in string form) and optionally a deprecator. The deprecator defaults +# to +ActiveSupport::Deprecator+ if none is specified. The deprecated constant +# now returns the value of the new one. +# +# PLANETS = %w(mercury venus earth mars jupiter saturn uranus neptune pluto) +# +# # (In a later update, the original implementation of `PLANETS` has been removed.) +# +# PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) +# PLANETS = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('PLANETS', 'PLANETS_POST_2006') +# +# PLANETS.map { |planet| planet.capitalize } +# # => DEPRECATION WARNING: PLANETS is deprecated! Use PLANETS_POST_2006 instead. +# (Backtrace information…) +# ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"] +# +# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#123 +class ActiveSupport::Deprecation::DeprecatedConstantProxy < ::Module + # @return [DeprecatedConstantProxy] a new instance of DeprecatedConstantProxy + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#131 + def initialize(old_const, new_const, deprecator = T.unsafe(nil), message: T.unsafe(nil)); end + + # Returns the class of the new constant. + # + # PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) + # PLANETS = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('PLANETS', 'PLANETS_POST_2006') + # PLANETS.class # => Array + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#157 + def class; end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#150 + def hash(*_arg0, **_arg1, &_arg2); end + + # Don't give a deprecation warning on inspect since test/unit and error + # logs rely on it for diagnostics. + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#144 + def inspect; end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#150 + def instance_methods(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#150 + def name(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#150 + def respond_to?(*_arg0, **_arg1, &_arg2); end + + private + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#166 + def const_missing(name); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#171 + def method_missing(called, *args, &block); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#162 + def target; end + + class << self + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#124 + def new(*args, **options, &block); end + end +end + +# DeprecatedInstanceVariableProxy transforms an instance variable into a +# deprecated one. It takes an instance of a class, a method on that class +# and an instance variable. It optionally takes a deprecator as the last +# argument. The deprecator defaults to +ActiveSupport::Deprecator+ if none +# is specified. +# +# class Example +# def initialize +# @request = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(self, :request, :@request) +# @_request = :special_request +# end +# +# def request +# @_request +# end +# +# def old_request +# @request +# end +# end +# +# example = Example.new +# # => # +# +# example.old_request.to_s +# # => DEPRECATION WARNING: @request is deprecated! Call request.to_s instead of +# @request.to_s +# (Backtrace information…) +# "special_request" +# +# example.request.to_s +# # => "special_request" +# +# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#88 +class ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy < ::ActiveSupport::Deprecation::DeprecationProxy + # @return [DeprecatedInstanceVariableProxy] a new instance of DeprecatedInstanceVariableProxy + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#89 + def initialize(instance, method, var = T.unsafe(nil), deprecator = T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#97 + def target; end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#101 + def warn(callstack, called, args); end +end + +# DeprecatedObjectProxy transforms an object into a deprecated one. It +# takes an object, a deprecation message, and optionally a deprecator. The +# deprecator defaults to +ActiveSupport::Deprecator+ if none is specified. +# +# deprecated_object = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(Object.new, "This object is now deprecated") +# # => # +# +# deprecated_object.to_s +# DEPRECATION WARNING: This object is now deprecated. +# (Backtrace) +# # => "#" +# +# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#39 +class ActiveSupport::Deprecation::DeprecatedObjectProxy < ::ActiveSupport::Deprecation::DeprecationProxy + # @return [DeprecatedObjectProxy] a new instance of DeprecatedObjectProxy + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#40 + def initialize(object, message, deprecator = T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#47 + def target; end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#51 + def warn(callstack, called, args); end +end + +# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#5 +class ActiveSupport::Deprecation::DeprecationProxy + # Don't give a deprecation warning on inspect since test/unit and error + # logs rely on it for diagnostics. + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#17 + def inspect; end + + private + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#22 + def method_missing(called, *args, &block); end + + class << self + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#6 + def new(*args, &block); end + end +end + +# source://activesupport//lib/active_support/deprecation/disallowed.rb#5 +module ActiveSupport::Deprecation::Disallowed + # Returns the configured criteria used to identify deprecation messages + # which should be treated as disallowed. + # + # source://activesupport//lib/active_support/deprecation/disallowed.rb#21 + def disallowed_warnings; end + + # Sets the criteria used to identify deprecation messages which should be + # disallowed. Can be an array containing strings, symbols, or regular + # expressions. (Symbols are treated as strings). These are compared against + # the text of the generated deprecation warning. + # + # Additionally the scalar symbol +:all+ may be used to treat all + # deprecations as disallowed. + # + # Deprecations matching a substring or regular expression will be handled + # using the configured +ActiveSupport::Deprecation.disallowed_behavior+ + # rather than +ActiveSupport::Deprecation.behavior+ + # + # source://activesupport//lib/active_support/deprecation/disallowed.rb#17 + def disallowed_warnings=(_arg0); end + + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/deprecation/disallowed.rb#26 + def deprecation_disallowed?(message); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/deprecation/disallowed.rb#40 + def explicitly_allowed?(message); end +end + +# source://activesupport//lib/active_support/deprecation/instance_delegator.rb#7 +module ActiveSupport::Deprecation::InstanceDelegator + mixes_in_class_methods ::ActiveSupport::Deprecation::InstanceDelegator::ClassMethods + mixes_in_class_methods ::ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators + + class << self + # @private + # + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#8 + def included(base); end + end +end + +# source://activesupport//lib/active_support/deprecation/instance_delegator.rb#14 +module ActiveSupport::Deprecation::InstanceDelegator::ClassMethods + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#15 + def include(included_module); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#20 + def method_added(method_name); end +end + +# source://activesupport//lib/active_support/deprecation/instance_delegator.rb#25 +module ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#31 + def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/deprecation/instance_delegator.rb#26 + def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/deprecation/method_wrappers.rb#8 +module ActiveSupport::Deprecation::MethodWrapper + # Declare that a method has been deprecated. + # + # class Fred + # def aaa; end + # def bbb; end + # def ccc; end + # def ddd; end + # def eee; end + # end + # + # Using the default deprecator: + # ActiveSupport::Deprecation.deprecate_methods(Fred, :aaa, bbb: :zzz, ccc: 'use Bar#ccc instead') + # # => Fred + # + # Fred.new.aaa + # # DEPRECATION WARNING: aaa is deprecated and will be removed from Rails 5.1. (called from irb_binding at (irb):10) + # # => nil + # + # Fred.new.bbb + # # DEPRECATION WARNING: bbb is deprecated and will be removed from Rails 5.1 (use zzz instead). (called from irb_binding at (irb):11) + # # => nil + # + # Fred.new.ccc + # # DEPRECATION WARNING: ccc is deprecated and will be removed from Rails 5.1 (use Bar#ccc instead). (called from irb_binding at (irb):12) + # # => nil + # + # Passing in a custom deprecator: + # custom_deprecator = ActiveSupport::Deprecation.new('next-release', 'MyGem') + # ActiveSupport::Deprecation.deprecate_methods(Fred, ddd: :zzz, deprecator: custom_deprecator) + # # => [:ddd] + # + # Fred.new.ddd + # DEPRECATION WARNING: ddd is deprecated and will be removed from MyGem next-release (use zzz instead). (called from irb_binding at (irb):15) + # # => nil + # + # Using a custom deprecator directly: + # custom_deprecator = ActiveSupport::Deprecation.new('next-release', 'MyGem') + # custom_deprecator.deprecate_methods(Fred, eee: :zzz) + # # => [:eee] + # + # Fred.new.eee + # DEPRECATION WARNING: eee is deprecated and will be removed from MyGem next-release (use zzz instead). (called from irb_binding at (irb):18) + # # => nil + # + # source://activesupport//lib/active_support/deprecation/method_wrappers.rb#52 + def deprecate_methods(target_module, *method_names); end +end + +# source://activesupport//lib/active_support/deprecation/reporting.rb#7 +module ActiveSupport::Deprecation::Reporting + # Allow previously disallowed deprecation warnings within the block. + # allowed_warnings can be an array containing strings, symbols, or regular + # expressions. (Symbols are treated as strings). These are compared against + # the text of deprecation warning messages generated within the block. + # Matching warnings will be exempt from the rules set by + # +ActiveSupport::Deprecation.disallowed_warnings+ + # + # The optional if: argument accepts a truthy/falsy value or an object that + # responds to .call. If truthy, then matching warnings will be allowed. + # If falsey then the method yields to the block without allowing the warning. + # + # ActiveSupport::Deprecation.disallowed_behavior = :raise + # ActiveSupport::Deprecation.disallowed_warnings = [ + # "something broke" + # ] + # + # ActiveSupport::Deprecation.warn('something broke!') + # # => ActiveSupport::DeprecationException + # + # ActiveSupport::Deprecation.allow ['something broke'] do + # ActiveSupport::Deprecation.warn('something broke!') + # end + # # => nil + # + # ActiveSupport::Deprecation.allow ['something broke'], if: Rails.env.production? do + # ActiveSupport::Deprecation.warn('something broke!') + # end + # # => ActiveSupport::DeprecationException for dev/test, nil for production + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#72 + def allow(allowed_warnings = T.unsafe(nil), if: T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#86 + def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end + + # Name of gem where method is deprecated + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#11 + def gem_name; end + + # Name of gem where method is deprecated + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#11 + def gem_name=(_arg0); end + + # Silence deprecation warnings within the block. + # + # ActiveSupport::Deprecation.warn('something broke!') + # # => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)" + # + # ActiveSupport::Deprecation.silence do + # ActiveSupport::Deprecation.warn('something broke!') + # end + # # => nil + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#40 + def silence(&block); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#82 + def silenced; end + + # Whether to print a message (silent mode) + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#9 + def silenced=(_arg0); end + + # Outputs a deprecation warning to the output configured by + # ActiveSupport::Deprecation.behavior. + # + # ActiveSupport::Deprecation.warn('something broke!') + # # => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)" + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#18 + def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/deprecation/reporting.rb#137 + def _extract_callstack(callstack); end + + # Outputs a deprecation warning message + # + # deprecated_method_warning(:method_name) + # # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon}" + # deprecated_method_warning(:method_name, :another_method) + # # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon} (use another_method instead)" + # deprecated_method_warning(:method_name, "Optional message") + # # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon} (Optional message)" + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#102 + def deprecated_method_warning(method_name, message = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#116 + def deprecation_caller_message(callstack); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#111 + def deprecation_message(callstack, message = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#127 + def extract_callstack(callstack); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#152 + def ignored_callstack(path); end +end + +# source://activesupport//lib/active_support/deprecation/reporting.rb#150 +ActiveSupport::Deprecation::Reporting::RAILS_GEM_ROOT = T.let(T.unsafe(nil), String) + +# Raised when ActiveSupport::Deprecation::Behavior#behavior is set with :raise. +# You would set :raise, as a behavior to raise errors and proactively report exceptions from deprecations. +# +# source://activesupport//lib/active_support/deprecation/behaviors.rb#8 +class ActiveSupport::DeprecationException < ::StandardError; end + +# This module provides an internal implementation to track descendants +# which is faster than iterating through ObjectSpace. +# +# source://activesupport//lib/active_support/descendants_tracker.rb#9 +module ActiveSupport::DescendantsTracker + # source://activesupport//lib/active_support/descendants_tracker.rb#88 + def descendants; end + + # source://activesupport//lib/active_support/descendants_tracker.rb#92 + def direct_descendants; end + + # source://activesupport//lib/active_support/descendants_tracker.rb#82 + def subclasses; end + + class << self + # source://activesupport//lib/active_support/descendants_tracker.rb#66 + def clear(classes); end + + # source://activesupport//lib/active_support/descendants_tracker.rb#62 + def descendants(klass); end + + # source://activesupport//lib/active_support/descendants_tracker.rb#11 + def direct_descendants(klass); end + + # source://activesupport//lib/active_support/descendants_tracker.rb#50 + def disable_clear!; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/descendants_tracker.rb#77 + def native?; end + + # source://activesupport//lib/active_support/descendants_tracker.rb#58 + def subclasses(klass); end + end +end + +# source://activesupport//lib/active_support/digest.rb#6 +class ActiveSupport::Digest + class << self + # source://activesupport//lib/active_support/digest.rb#8 + def hash_digest_class; end + + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/digest.rb#12 + def hash_digest_class=(klass); end + + # source://activesupport//lib/active_support/digest.rb#17 + def hexdigest(arg); end + end +end + +# Provides accurate date and time measurements using Date#advance and +# Time#advance, respectively. It mainly supports the methods on Numeric. +# +# 1.month.ago # equivalent to Time.now.advance(months: -1) +# +# source://activesupport//lib/active_support/duration.rb#13 +class ActiveSupport::Duration + # @return [Duration] a new instance of Duration + # + # source://activesupport//lib/active_support/duration.rb#223 + def initialize(value, parts, variable = T.unsafe(nil)); end + + # Returns the modulo of this Duration by another Duration or Numeric. + # Numeric values are treated as seconds. + # + # source://activesupport//lib/active_support/duration.rb#306 + def %(other); end + + # Multiplies this Duration by a Numeric and returns a new Duration. + # + # source://activesupport//lib/active_support/duration.rb#281 + def *(other); end + + # Adds another Duration or a Numeric to this Duration. Numeric values + # are treated as seconds. + # + # source://activesupport//lib/active_support/duration.rb#262 + def +(other); end + + # source://activesupport//lib/active_support/duration.rb#320 + def +@; end + + # Subtracts another Duration or a Numeric from this Duration. Numeric + # values are treated as seconds. + # + # source://activesupport//lib/active_support/duration.rb#276 + def -(other); end + + # source://activesupport//lib/active_support/duration.rb#316 + def -@; end + + # Divides this Duration by a Numeric and returns a new Duration. + # + # source://activesupport//lib/active_support/duration.rb#292 + def /(other); end + + # Compares one Duration with another or a Numeric to this Duration. + # Numeric values are treated as seconds. + # + # source://activesupport//lib/active_support/duration.rb#252 + def <=>(other); end + + # Returns +true+ if +other+ is also a Duration instance with the + # same +value+, or if other == value. + # + # source://activesupport//lib/active_support/duration.rb#335 + def ==(other); end + + # source://activesupport//lib/active_support/duration.rb#475 + def _parts; end + + # Calculates a new Time or Date that is as far in the future + # as this Duration represents. + # + # source://activesupport//lib/active_support/duration.rb#430 + def after(time = T.unsafe(nil)); end + + # Calculates a new Time or Date that is as far in the past + # as this Duration represents. + # + # source://activesupport//lib/active_support/duration.rb#438 + def ago(time = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/duration.rb#453 + def as_json(options = T.unsafe(nil)); end + + # Calculates a new Time or Date that is as far in the past + # as this Duration represents. + # + # source://activesupport//lib/active_support/duration.rb#438 + def before(time = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/duration.rb#239 + def coerce(other); end + + # source://activesupport//lib/active_support/duration.rb#461 + def encode_with(coder); end + + # Returns +true+ if +other+ is also a Duration instance, which has the + # same parts as this one. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#420 + def eql?(other); end + + # Calculates a new Time or Date that is as far in the future + # as this Duration represents. + # + # source://activesupport//lib/active_support/duration.rb#430 + def from_now(time = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/duration.rb#424 + def hash; end + + # Returns the amount of days a duration covers as a float + # + # 12.hours.in_days # => 0.5 + # + # source://activesupport//lib/active_support/duration.rb#393 + def in_days; end + + # Returns the amount of hours a duration covers as a float + # + # 1.day.in_hours # => 24.0 + # + # source://activesupport//lib/active_support/duration.rb#386 + def in_hours; end + + # Returns the amount of minutes a duration covers as a float + # + # 1.day.in_minutes # => 1440.0 + # + # source://activesupport//lib/active_support/duration.rb#379 + def in_minutes; end + + # Returns the amount of months a duration covers as a float + # + # 9.weeks.in_months # => 2.07 + # + # source://activesupport//lib/active_support/duration.rb#407 + def in_months; end + + # Returns the number of seconds that this Duration represents. + # + # 1.minute.to_i # => 60 + # 1.hour.to_i # => 3600 + # 1.day.to_i # => 86400 + # + # Note that this conversion makes some assumptions about the + # duration of some periods, e.g. months are always 1/12 of year + # and years are 365.2425 days: + # + # # equivalent to (1.year / 12).to_i + # 1.month.to_i # => 2629746 + # + # # equivalent to 365.2425.days.to_i + # 1.year.to_i # => 31556952 + # + # In such cases, Ruby's core + # Date[https://ruby-doc.org/stdlib/libdoc/date/rdoc/Date.html] and + # Time[https://ruby-doc.org/stdlib/libdoc/time/rdoc/Time.html] should be used for precision + # date and time arithmetic. + # + # source://activesupport//lib/active_support/duration.rb#371 + def in_seconds; end + + # Returns the amount of weeks a duration covers as a float + # + # 2.months.in_weeks # => 8.696 + # + # source://activesupport//lib/active_support/duration.rb#400 + def in_weeks; end + + # Returns the amount of years a duration covers as a float + # + # 30.days.in_years # => 0.082 + # + # source://activesupport//lib/active_support/duration.rb#414 + def in_years; end + + # source://activesupport//lib/active_support/duration.rb#457 + def init_with(coder); end + + # source://activesupport//lib/active_support/duration.rb#444 + def inspect; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#329 + def instance_of?(klass); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#324 + def is_a?(klass); end + + # Build ISO 8601 Duration string for this duration. + # The +precision+ parameter can be used to limit seconds' precision of duration. + # + # source://activesupport//lib/active_support/duration.rb#467 + def iso8601(precision: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#324 + def kind_of?(klass); end + + # Returns a copy of the parts hash that defines the duration + # + # source://activesupport//lib/active_support/duration.rb#235 + def parts; end + + # Calculates a new Time or Date that is as far in the future + # as this Duration represents. + # + # source://activesupport//lib/active_support/duration.rb#430 + def since(time = T.unsafe(nil)); end + + # Returns the number of seconds that this Duration represents. + # + # 1.minute.to_i # => 60 + # 1.hour.to_i # => 3600 + # 1.day.to_i # => 86400 + # + # Note that this conversion makes some assumptions about the + # duration of some periods, e.g. months are always 1/12 of year + # and years are 365.2425 days: + # + # # equivalent to (1.year / 12).to_i + # 1.month.to_i # => 2629746 + # + # # equivalent to 365.2425.days.to_i + # 1.year.to_i # => 31556952 + # + # In such cases, Ruby's core + # Date[https://ruby-doc.org/stdlib/libdoc/date/rdoc/Date.html] and + # Time[https://ruby-doc.org/stdlib/libdoc/time/rdoc/Time.html] should be used for precision + # date and time arithmetic. + # + # source://activesupport//lib/active_support/duration.rb#371 + def to_i; end + + # Returns the amount of seconds a duration covers as a string. + # For more information check to_i method. + # + # 1.day.to_s # => "86400" + # + # source://activesupport//lib/active_support/duration.rb#347 + def to_s; end + + # Calculates a new Time or Date that is as far in the past + # as this Duration represents. + # + # source://activesupport//lib/active_support/duration.rb#438 + def until(time = T.unsafe(nil)); end + + # Returns the value of attribute value. + # + # source://activesupport//lib/active_support/duration.rb#132 + def value; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#471 + def variable?; end + + private + + # source://activesupport//lib/active_support/duration.rb#506 + def method_missing(method, *args, &block); end + + # @raise [TypeError] + # + # source://activesupport//lib/active_support/duration.rb#510 + def raise_type_error(other); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#502 + def respond_to_missing?(method, _); end + + # source://activesupport//lib/active_support/duration.rb#480 + def sum(sign, time = T.unsafe(nil)); end + + class << self + # source://activesupport//lib/active_support/duration.rb#148 + def ===(other); end + + # Creates a new Duration from a seconds value that is converted + # to the individual parts: + # + # ActiveSupport::Duration.build(31556952).parts # => {:years=>1} + # ActiveSupport::Duration.build(2716146).parts # => {:months=>1, :days=>1} + # + # source://activesupport//lib/active_support/duration.rb#188 + def build(value); end + + # source://activesupport//lib/active_support/duration.rb#166 + def days(value); end + + # source://activesupport//lib/active_support/duration.rb#162 + def hours(value); end + + # source://activesupport//lib/active_support/duration.rb#158 + def minutes(value); end + + # source://activesupport//lib/active_support/duration.rb#174 + def months(value); end + + # Creates a new Duration from string formatted according to ISO 8601 Duration. + # + # See {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601#Durations] for more information. + # This method allows negative parts to be present in pattern. + # If invalid string is provided, it will raise +ActiveSupport::Duration::ISO8601Parser::ParsingError+. + # + # source://activesupport//lib/active_support/duration.rb#143 + def parse(iso8601duration); end + + # source://activesupport//lib/active_support/duration.rb#154 + def seconds(value); end + + # source://activesupport//lib/active_support/duration.rb#170 + def weeks(value); end + + # source://activesupport//lib/active_support/duration.rb#178 + def years(value); end + + private + + # source://activesupport//lib/active_support/duration.rb#216 + def calculate_total_seconds(parts); end + end +end + +# Parses a string formatted according to ISO 8601 Duration into the hash. +# +# See {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601#Durations] for more information. +# +# This parser allows negative parts to be present in pattern. +# +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#12 +class ActiveSupport::Duration::ISO8601Parser + # @return [ISO8601Parser] a new instance of ISO8601Parser + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#34 + def initialize(string); end + + # Returns the value of attribute mode. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 + def mode; end + + # Sets the attribute mode + # + # @param value the value to set the attribute mode to. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 + def mode=(_arg0); end + + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#41 + def parse!; end + + # Returns the value of attribute parts. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#31 + def parts; end + + # Returns the value of attribute scanner. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#31 + def scanner; end + + # Returns the value of attribute sign. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 + def sign; end + + # Sets the attribute sign + # + # @param value the value to set the attribute sign to. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 + def sign=(_arg0); end + + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#83 + def finished?; end + + # Parses number which can be a float with either comma or period. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#88 + def number; end + + # @raise [ParsingError] + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#96 + def raise_parsing_error(reason = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#92 + def scan(pattern); end + + # Checks for various semantic errors as stated in ISO 8601 standard. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#101 + def validate!; end +end + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#17 +ActiveSupport::Duration::ISO8601Parser::COMMA = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#22 +ActiveSupport::Duration::ISO8601Parser::DATE_COMPONENT = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#28 +ActiveSupport::Duration::ISO8601Parser::DATE_COMPONENTS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#20 +ActiveSupport::Duration::ISO8601Parser::DATE_MARKER = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#25 +ActiveSupport::Duration::ISO8601Parser::DATE_TO_PART = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#16 +ActiveSupport::Duration::ISO8601Parser::PERIOD = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#15 +ActiveSupport::Duration::ISO8601Parser::PERIOD_OR_COMMA = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#13 +class ActiveSupport::Duration::ISO8601Parser::ParsingError < ::ArgumentError; end + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#19 +ActiveSupport::Duration::ISO8601Parser::SIGN_MARKER = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#23 +ActiveSupport::Duration::ISO8601Parser::TIME_COMPONENT = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#29 +ActiveSupport::Duration::ISO8601Parser::TIME_COMPONENTS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#21 +ActiveSupport::Duration::ISO8601Parser::TIME_MARKER = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#26 +ActiveSupport::Duration::ISO8601Parser::TIME_TO_PART = T.let(T.unsafe(nil), Hash) + +# Serializes duration to string according to ISO 8601 Duration format. +# +# source://activesupport//lib/active_support/duration/iso8601_serializer.rb#8 +class ActiveSupport::Duration::ISO8601Serializer + # @return [ISO8601Serializer] a new instance of ISO8601Serializer + # + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#11 + def initialize(duration, precision: T.unsafe(nil)); end + + # Builds and returns output string. + # + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#17 + def serialize; end + + private + + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#58 + def format_seconds(seconds); end + + # Return pair of duration's parts and whole duration sign. + # Parts are summarized (as they can become repetitive due to addition, etc). + # Zero parts are removed as not significant. + # If all parts are negative it will negate all of them and return minus as a sign. + # + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#41 + def normalize; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#54 + def week_mixed_with_date?(parts); end +end + +# source://activesupport//lib/active_support/duration/iso8601_serializer.rb#9 +ActiveSupport::Duration::ISO8601Serializer::DATE_COMPONENTS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/duration.rb#129 +ActiveSupport::Duration::PARTS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/duration.rb#119 +ActiveSupport::Duration::PARTS_IN_SECONDS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/duration.rb#114 +ActiveSupport::Duration::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/duration.rb#113 +ActiveSupport::Duration::SECONDS_PER_HOUR = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/duration.rb#112 +ActiveSupport::Duration::SECONDS_PER_MINUTE = T.let(T.unsafe(nil), Integer) + +# 1/12 of a gregorian year +# +# source://activesupport//lib/active_support/duration.rb#116 +ActiveSupport::Duration::SECONDS_PER_MONTH = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/duration.rb#115 +ActiveSupport::Duration::SECONDS_PER_WEEK = T.let(T.unsafe(nil), Integer) + +# length of a gregorian year (365.2425 days) +# +# source://activesupport//lib/active_support/duration.rb#117 +ActiveSupport::Duration::SECONDS_PER_YEAR = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/duration.rb#14 +class ActiveSupport::Duration::Scalar < ::Numeric + # @return [Scalar] a new instance of Scalar + # + # source://activesupport//lib/active_support/duration.rb#18 + def initialize(value); end + + # source://activesupport//lib/active_support/duration.rb#84 + def %(other); end + + # source://activesupport//lib/active_support/duration.rb#65 + def *(other); end + + # source://activesupport//lib/active_support/duration.rb#40 + def +(other); end + + # source://activesupport//lib/active_support/duration.rb#52 + def -(other); end + + # source://activesupport//lib/active_support/duration.rb#26 + def -@; end + + # source://activesupport//lib/active_support/duration.rb#76 + def /(other); end + + # source://activesupport//lib/active_support/duration.rb#30 + def <=>(other); end + + # source://activesupport//lib/active_support/duration.rb#22 + def coerce(other); end + + # source://activesupport//lib/active_support/duration.rb#16 + def to_f(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/duration.rb#16 + def to_i(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/duration.rb#16 + def to_s(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute value. + # + # source://activesupport//lib/active_support/duration.rb#15 + def value; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#92 + def variable?; end + + private + + # source://activesupport//lib/active_support/duration.rb#97 + def calculate(op, other); end + + # @raise [TypeError] + # + # source://activesupport//lib/active_support/duration.rb#107 + def raise_type_error(other); end +end + +# source://activesupport//lib/active_support/duration.rb#130 +ActiveSupport::Duration::VARIABLE_PARTS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/encrypted_configuration.rb#10 +class ActiveSupport::EncryptedConfiguration < ::ActiveSupport::EncryptedFile + # @return [EncryptedConfiguration] a new instance of EncryptedConfiguration + # + # source://activesupport//lib/active_support/encrypted_configuration.rb#14 + def initialize(config_path:, key_path:, env_key:, raise_if_missing_key:); end + + # source://activesupport//lib/active_support/encrypted_configuration.rb#11 + def [](*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/encrypted_configuration.rb#32 + def config; end + + # source://activesupport//lib/active_support/encrypted_configuration.rb#11 + def fetch(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/core_ext/module/delegation.rb#302 + def method_missing(method, *args, **_arg2, &block); end + + # Allow a config to be started without a file present + # + # source://activesupport//lib/active_support/encrypted_configuration.rb#20 + def read; end + + # source://activesupport//lib/active_support/encrypted_configuration.rb#26 + def write(contents); end + + private + + # source://activesupport//lib/active_support/encrypted_configuration.rb#37 + def deep_transform(hash); end + + # source://activesupport//lib/active_support/encrypted_configuration.rb#51 + def deserialize(config); end + + # source://activesupport//lib/active_support/encrypted_configuration.rb#47 + def options; end + + # source://activesupport//lib/active_support/core_ext/module/delegation.rb#294 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/encrypted_file.rb#8 +class ActiveSupport::EncryptedFile + # @return [EncryptedFile] a new instance of EncryptedFile + # + # source://activesupport//lib/active_support/encrypted_file.rb#42 + def initialize(content_path:, key_path:, env_key:, raise_if_missing_key:); end + + # source://activesupport//lib/active_support/encrypted_file.rb#77 + def change(&block); end + + # Returns the value of attribute content_path. + # + # source://activesupport//lib/active_support/encrypted_file.rb#40 + def content_path; end + + # Returns the value of attribute env_key. + # + # source://activesupport//lib/active_support/encrypted_file.rb#40 + def env_key; end + + # Returns the encryption key, first trying the environment variable + # specified by +env_key+, then trying the key file specified by +key_path+. + # If +raise_if_missing_key+ is true, raises MissingKeyError if the + # environment variable is not set and the key file does not exist. + # + # source://activesupport//lib/active_support/encrypted_file.rb#52 + def key; end + + # Returns the value of attribute key_path. + # + # source://activesupport//lib/active_support/encrypted_file.rb#40 + def key_path; end + + # Returns the value of attribute raise_if_missing_key. + # + # source://activesupport//lib/active_support/encrypted_file.rb#40 + def raise_if_missing_key; end + + # Reads the file and returns the decrypted content. + # + # Raises: + # - MissingKeyError if the key is missing and +raise_if_missing_key+ is true. + # - MissingContentError if the encrypted file does not exist or otherwise + # if the key is missing. + # - ActiveSupport::MessageEncryptor::InvalidMessage if the content cannot be + # decrypted or verified. + # + # source://activesupport//lib/active_support/encrypted_file.rb#64 + def read; end + + # source://activesupport//lib/active_support/encrypted_file.rb#72 + def write(contents); end + + private + + # @raise [InvalidKeyLengthError] + # + # source://activesupport//lib/active_support/encrypted_file.rb#125 + def check_key_length; end + + # source://activesupport//lib/active_support/encrypted_file.rb#103 + def decrypt(contents); end + + # source://activesupport//lib/active_support/encrypted_file.rb#98 + def encrypt(contents); end + + # source://activesupport//lib/active_support/encrypted_file.rb#107 + def encryptor; end + + # @raise [MissingKeyError] + # + # source://activesupport//lib/active_support/encrypted_file.rb#121 + def handle_missing_key; end + + # source://activesupport//lib/active_support/encrypted_file.rb#112 + def read_env_key; end + + # source://activesupport//lib/active_support/encrypted_file.rb#116 + def read_key_file; end + + # source://activesupport//lib/active_support/encrypted_file.rb#83 + def writing(contents); end + + class << self + # source://activesupport//lib/active_support/encrypted_file.rb#35 + def expected_key_length; end + + # source://activesupport//lib/active_support/encrypted_file.rb#31 + def generate_key; end + end +end + +# source://activesupport//lib/active_support/encrypted_file.rb#29 +ActiveSupport::EncryptedFile::CIPHER = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/encrypted_file.rb#23 +class ActiveSupport::EncryptedFile::InvalidKeyLengthError < ::RuntimeError + # @return [InvalidKeyLengthError] a new instance of InvalidKeyLengthError + # + # source://activesupport//lib/active_support/encrypted_file.rb#24 + def initialize; end +end + +# source://activesupport//lib/active_support/encrypted_file.rb#9 +class ActiveSupport::EncryptedFile::MissingContentError < ::RuntimeError + # @return [MissingContentError] a new instance of MissingContentError + # + # source://activesupport//lib/active_support/encrypted_file.rb#10 + def initialize(content_path); end +end + +# source://activesupport//lib/active_support/encrypted_file.rb#15 +class ActiveSupport::EncryptedFile::MissingKeyError < ::RuntimeError + # @return [MissingKeyError] a new instance of MissingKeyError + # + # source://activesupport//lib/active_support/encrypted_file.rb#16 + def initialize(key_path:, env_key:); end +end + +# source://activesupport//lib/active_support/core_ext/enumerable.rb#4 +module ActiveSupport::EnumerableCoreExt; end + +# source://activesupport//lib/active_support/core_ext/enumerable.rb#5 +module ActiveSupport::EnumerableCoreExt::Constants + private + + # source://activesupport//lib/active_support/core_ext/enumerable.rb#7 + def const_missing(name); end +end + +# HACK: For performance reasons, Enumerable shouldn't have any constants of its own. +# So we move SoleItemExpectedError into ActiveSupport::EnumerableCoreExt. +# +# source://activesupport//lib/active_support/core_ext/enumerable.rb#25 +ActiveSupport::EnumerableCoreExt::SoleItemExpectedError = Enumerable::SoleItemExpectedError + +# source://activesupport//lib/active_support/environment_inquirer.rb#6 +class ActiveSupport::EnvironmentInquirer < ::ActiveSupport::StringInquirer + # @return [EnvironmentInquirer] a new instance of EnvironmentInquirer + # + # source://activesupport//lib/active_support/environment_inquirer.rb#8 + def initialize(env); end + + def development?; end + def production?; end + def test?; end +end + +# source://activesupport//lib/active_support/environment_inquirer.rb#7 +ActiveSupport::EnvironmentInquirer::DEFAULT_ENVIRONMENTS = T.let(T.unsafe(nil), Array) + +# +ActiveSupport::ErrorReporter+ is a common interface for error reporting services. +# +# To rescue and report any unhandled error, you can use the +handle+ method: +# +# Rails.error.handle do +# do_something! +# end +# +# If an error is raised, it will be reported and swallowed. +# +# Alternatively if you want to report the error but not swallow it, you can use +record+ +# +# Rails.error.record do +# do_something! +# end +# +# Both methods can be restricted to only handle a specific exception class +# +# maybe_tags = Rails.error.handle(Redis::BaseError) { redis.get("tags") } +# +# You can also pass some extra context information that may be used by the error subscribers: +# +# Rails.error.handle(context: { section: "admin" }) do +# # ... +# end +# +# Additionally a +severity+ can be passed along to communicate how important the error report is. +# +severity+ can be one of +:error+, +:warning+, or +:info+. Handled errors default to the +:warning+ +# severity, and unhandled ones to +:error+. +# +# Both +handle+ and +record+ pass through the return value from the block. In the case of +handle+ +# rescuing an error, a fallback can be provided. The fallback must be a callable whose result will +# be returned when the block raises and is handled: +# +# user = Rails.error.handle(fallback: -> { User.anonymous }) do +# User.find_by(params) +# end +# +# source://activesupport//lib/active_support/error_reporter.rb#41 +class ActiveSupport::ErrorReporter + # @return [ErrorReporter] a new instance of ErrorReporter + # + # source://activesupport//lib/active_support/error_reporter.rb#46 + def initialize(*subscribers, logger: T.unsafe(nil)); end + + # Report any unhandled exception, and swallow it. + # + # Rails.error.handle do + # 1 + '1' + # end + # + # source://activesupport//lib/active_support/error_reporter.rb#57 + def handle(error_class = T.unsafe(nil), severity: T.unsafe(nil), context: T.unsafe(nil), fallback: T.unsafe(nil)); end + + # Returns the value of attribute logger. + # + # source://activesupport//lib/active_support/error_reporter.rb#44 + def logger; end + + # Sets the attribute logger + # + # @param value the value to set the attribute logger to. + # + # source://activesupport//lib/active_support/error_reporter.rb#44 + def logger=(_arg0); end + + # source://activesupport//lib/active_support/error_reporter.rb#64 + def record(error_class = T.unsafe(nil), severity: T.unsafe(nil), context: T.unsafe(nil)); end + + # When the block based +handle+ and +record+ methods are not suitable, you can directly use +report+ + # + # Rails.error.report(error, handled: true) + # + # source://activesupport//lib/active_support/error_reporter.rb#95 + def report(error, handled:, severity: T.unsafe(nil), context: T.unsafe(nil)); end + + # Update the execution context that is accessible to error subscribers + # + # Rails.error.set_context(section: "checkout", user_id: @user.id) + # + # See +ActiveSupport::ExecutionContext.set+ + # + # source://activesupport//lib/active_support/error_reporter.rb#88 + def set_context(*_arg0, **_arg1, &_arg2); end + + # Register a new error subscriber. The subscriber must respond to + # + # report(Exception, handled: Boolean, context: Hash) + # + # The +report+ method +should+ never raise an error. + # + # source://activesupport//lib/active_support/error_reporter.rb#76 + def subscribe(subscriber); end +end + +# source://activesupport//lib/active_support/error_reporter.rb#42 +ActiveSupport::ErrorReporter::SEVERITIES = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/execution_context.rb#4 +module ActiveSupport::ExecutionContext + class << self + # source://activesupport//lib/active_support/execution_context.rb#34 + def []=(key, value); end + + # source://activesupport//lib/active_support/execution_context.rb#7 + def after_change(&block); end + + # source://activesupport//lib/active_support/execution_context.rb#43 + def clear; end + + # Updates the execution context. If a block is given, it resets the provided keys to their + # previous value once the block exits. + # + # source://activesupport//lib/active_support/execution_context.rb#13 + def set(**options); end + + # source://activesupport//lib/active_support/execution_context.rb#39 + def to_h; end + + private + + # source://activesupport//lib/active_support/execution_context.rb#48 + def store; end + end +end + +# source://activesupport//lib/active_support/execution_wrapper.rb#8 +class ActiveSupport::ExecutionWrapper + include ::ActiveSupport::Callbacks + extend ::ActiveSupport::Callbacks::ClassMethods + extend ::ActiveSupport::DescendantsTracker + + # source://activesupport//lib/active_support/callbacks.rb#68 + def __callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#68 + def __callbacks?; end + + # source://activesupport//lib/active_support/callbacks.rb#940 + def _complete_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#940 + def _run_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#928 + def _run_complete_callbacks(&block); end + + # source://activesupport//lib/active_support/callbacks.rb#928 + def _run_run_callbacks(&block); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#142 + def complete; end + + # Complete this in-flight execution. This method *must* be called + # exactly once on the result of any call to +run!+. + # + # Where possible, prefer +wrap+. + # + # source://activesupport//lib/active_support/execution_wrapper.rb#136 + def complete!; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#128 + def run; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#123 + def run!; end + + private + + # source://activesupport//lib/active_support/execution_wrapper.rb#147 + def hook_state; end + + class << self + # source://activesupport//lib/active_support/callbacks.rb#68 + def __callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#68 + def __callbacks=(value); end + + # source://activesupport//lib/active_support/callbacks.rb#68 + def __callbacks?; end + + # source://activesupport//lib/active_support/callbacks.rb#932 + def _complete_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#936 + def _complete_callbacks=(value); end + + # source://activesupport//lib/active_support/callbacks.rb#932 + def _run_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#936 + def _run_callbacks=(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/execution_wrapper.rb#119 + def active?; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#115 + def active_key; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#111 + def error_reporter; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#101 + def perform; end + + # Register an object to be invoked during both the +run+ and + # +complete+ steps. + # + # +hook.complete+ will be passed the value returned from +hook.run+, + # and will only be invoked if +run+ has previously been called. + # (Mostly, this means it won't be invoked if an exception occurs in + # a preceding +to_run+ block; all ordinary +to_complete+ blocks are + # invoked in that situation.) + # + # source://activesupport//lib/active_support/execution_wrapper.rb#51 + def register_hook(hook, outer: T.unsafe(nil)); end + + # Run this execution. + # + # Returns an instance, whose +complete!+ method *must* be invoked + # after the work has been performed. + # + # Where possible, prefer +wrap+. + # + # source://activesupport//lib/active_support/execution_wrapper.rb#67 + def run!(reset: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#22 + def to_complete(*args, &block); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#18 + def to_run(*args, &block); end + + # Perform the work in the supplied block as an execution. + # + # source://activesupport//lib/active_support/execution_wrapper.rb#87 + def wrap; end + end +end + +# source://activesupport//lib/active_support/execution_wrapper.rb#33 +class ActiveSupport::ExecutionWrapper::CompleteHook < ::Struct + # source://activesupport//lib/active_support/execution_wrapper.rb#34 + def after(target); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#34 + def before(target); end + + # Returns the value of attribute hook + # + # @return [Object] the current value of hook + def hook; end + + # Sets the attribute hook + # + # @param value [Object] the value to set the attribute hook to. + # @return [Object] the newly set value + def hook=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://activesupport//lib/active_support/execution_wrapper.rb#11 +ActiveSupport::ExecutionWrapper::Null = T.let(T.unsafe(nil), Object) + +# source://activesupport//lib/active_support/execution_wrapper.rb#26 +class ActiveSupport::ExecutionWrapper::RunHook < ::Struct + # source://activesupport//lib/active_support/execution_wrapper.rb#27 + def before(target); end + + # Returns the value of attribute hook + # + # @return [Object] the current value of hook + def hook; end + + # Sets the attribute hook + # + # @param value [Object] the value to set the attribute hook to. + # @return [Object] the newly set value + def hook=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://activesupport//lib/active_support/executor.rb#6 +class ActiveSupport::Executor < ::ActiveSupport::ExecutionWrapper; end + +# FileUpdateChecker specifies the API used by Rails to watch files +# and control reloading. The API depends on four methods: +# +# * +initialize+ which expects two parameters and one block as +# described below. +# +# * +updated?+ which returns a boolean if there were updates in +# the filesystem or not. +# +# * +execute+ which executes the given block on initialization +# and updates the latest watched files and timestamp. +# +# * +execute_if_updated+ which just executes the block if it was updated. +# +# After initialization, a call to +execute_if_updated+ must execute +# the block only if there was really a change in the filesystem. +# +# This class is used by Rails to reload the I18n framework whenever +# they are changed upon a new request. +# +# i18n_reloader = ActiveSupport::FileUpdateChecker.new(paths) do +# I18n.reload! +# end +# +# ActiveSupport::Reloader.to_prepare do +# i18n_reloader.execute_if_updated +# end +# +# source://activesupport//lib/active_support/file_update_checker.rb#33 +class ActiveSupport::FileUpdateChecker + # It accepts two parameters on initialization. The first is an array + # of files and the second is an optional hash of directories. The hash must + # have directories as keys and the value is an array of extensions to be + # watched under that directory. + # + # This method must also receive a block that will be called once a path + # changes. The array of files and list of directories cannot be changed + # after FileUpdateChecker has been initialized. + # + # @return [FileUpdateChecker] a new instance of FileUpdateChecker + # + # source://activesupport//lib/active_support/file_update_checker.rb#42 + def initialize(files, dirs = T.unsafe(nil), &block); end + + # Executes the given block and updates the latest watched files and + # timestamp. + # + # source://activesupport//lib/active_support/file_update_checker.rb#80 + def execute; end + + # Execute the block given if updated. + # + # source://activesupport//lib/active_support/file_update_checker.rb#90 + def execute_if_updated; end + + # Check if any of the entries were updated. If so, the watched and/or + # updated_at values are cached until the block is executed via +execute+ + # or +execute_if_updated+. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/file_update_checker.rb#61 + def updated?; end + + private + + # source://activesupport//lib/active_support/file_update_checker.rb#156 + def compile_ext(array); end + + # source://activesupport//lib/active_support/file_update_checker.rb#142 + def compile_glob(hash); end + + # source://activesupport//lib/active_support/file_update_checker.rb#152 + def escape(key); end + + # This method returns the maximum mtime of the files in +paths+, or +nil+ + # if the array is empty. + # + # Files with a mtime in the future are ignored. Such abnormal situation + # can happen for example if the user changes the clock by hand. It is + # healthy to consider this edge case because with mtimes in the future + # reloading is not triggered. + # + # source://activesupport//lib/active_support/file_update_checker.rb#120 + def max_mtime(paths); end + + # source://activesupport//lib/active_support/file_update_checker.rb#109 + def updated_at(paths); end + + # source://activesupport//lib/active_support/file_update_checker.rb#101 + def watched; end +end + +# source://activesupport//lib/active_support/fork_tracker.rb#4 +module ActiveSupport::ForkTracker + class << self + # source://activesupport//lib/active_support/fork_tracker.rb#59 + def after_fork(&block); end + + # source://activesupport//lib/active_support/fork_tracker.rb#40 + def check!; end + + # source://activesupport//lib/active_support/fork_tracker.rb#48 + def hook!; end + + # source://activesupport//lib/active_support/fork_tracker.rb#64 + def unregister(callback); end + end +end + +# source://activesupport//lib/active_support/fork_tracker.rb#15 +module ActiveSupport::ForkTracker::CoreExt + # source://activesupport//lib/active_support/fork_tracker.rb#16 + def fork(*_arg0, **_arg1, &_arg2); end +end + +# source://activesupport//lib/active_support/fork_tracker.rb#31 +module ActiveSupport::ForkTracker::CoreExtPrivate + include ::ActiveSupport::ForkTracker::CoreExt + + private + + # source://activesupport//lib/active_support/fork_tracker.rb#16 + def fork(*_arg0, **_arg1, &_arg2); end +end + +# source://activesupport//lib/active_support/fork_tracker.rb#5 +module ActiveSupport::ForkTracker::ModernCoreExt + # source://activesupport//lib/active_support/fork_tracker.rb#6 + def _fork; end +end + +# A convenient wrapper for the zlib standard library that allows +# compression/decompression of strings with gzip. +# +# gzip = ActiveSupport::Gzip.compress('compress me!') +# # => "\x1F\x8B\b\x00o\x8D\xCDO\x00\x03K\xCE\xCF-(J-.V\xC8MU\x04\x00R>n\x83\f\x00\x00\x00" +# +# ActiveSupport::Gzip.decompress(gzip) +# # => "compress me!" +# +# source://activesupport//lib/active_support/gzip.rb#15 +module ActiveSupport::Gzip + class << self + # Compresses a string using gzip. + # + # source://activesupport//lib/active_support/gzip.rb#30 + def compress(source, level = T.unsafe(nil), strategy = T.unsafe(nil)); end + + # Decompresses a gzipped string. + # + # source://activesupport//lib/active_support/gzip.rb#25 + def decompress(source); end + end +end + +# source://activesupport//lib/active_support/gzip.rb#16 +class ActiveSupport::Gzip::Stream < ::StringIO + # @return [Stream] a new instance of Stream + # + # source://activesupport//lib/active_support/gzip.rb#17 + def initialize(*_arg0); end + + # source://activesupport//lib/active_support/gzip.rb#21 + def close; end +end + +# Implements a hash where keys :foo and "foo" are considered +# to be the same. +# +# rgb = ActiveSupport::HashWithIndifferentAccess.new +# +# rgb[:black] = '#000000' +# rgb[:black] # => '#000000' +# rgb['black'] # => '#000000' +# +# rgb['white'] = '#FFFFFF' +# rgb[:white] # => '#FFFFFF' +# rgb['white'] # => '#FFFFFF' +# +# Internally symbols are mapped to strings when used as keys in the entire +# writing interface (calling []=, merge, etc). This +# mapping belongs to the public interface. For example, given: +# +# hash = ActiveSupport::HashWithIndifferentAccess.new(a: 1) +# +# You are guaranteed that the key is returned as a string: +# +# hash.keys # => ["a"] +# +# Technically other types of keys are accepted: +# +# hash = ActiveSupport::HashWithIndifferentAccess.new(a: 1) +# hash[0] = 0 +# hash # => {"a"=>1, 0=>0} +# +# but this class is intended for use cases where strings or symbols are the +# expected keys and it is convenient to understand both as the same. For +# example the +params+ hash in Ruby on Rails. +# +# Note that core extensions define Hash#with_indifferent_access: +# +# rgb = { black: '#000000', white: '#FFFFFF' }.with_indifferent_access +# +# which may be handy. +# +# To access this class outside of Rails, require the core extension with: +# +# require "active_support/core_ext/hash/indifferent_access" +# +# which will, in turn, require this file. +# +# source://activesupport//lib/active_support/hash_with_indifferent_access.rb#55 +class ActiveSupport::HashWithIndifferentAccess < ::Hash + # @return [HashWithIndifferentAccess] a new instance of HashWithIndifferentAccess + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#68 + def initialize(constructor = T.unsafe(nil)); end + + # Same as Hash#[] where the key passed as argument can be + # either a string or a symbol: + # + # counters = ActiveSupport::HashWithIndifferentAccess.new + # counters[:foo] = 1 + # + # counters['foo'] # => 1 + # counters[:foo] # => 1 + # counters[:zoo] # => nil + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#166 + def [](key); end + + # Assigns a new value to the hash: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash[:key] = 'value' + # + # This value can be later fetched using either +:key+ or 'key'. + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#96 + def []=(key, value); end + + # Same as Hash#assoc where the key passed as argument can be + # either a string or a symbol: + # + # counters = ActiveSupport::HashWithIndifferentAccess.new + # counters[:foo] = 1 + # + # counters.assoc('foo') # => ["foo", 1] + # counters.assoc(:foo) # => ["foo", 1] + # counters.assoc(:zoo) # => nil + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#179 + def assoc(key); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#357 + def compact; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#311 + def deep_stringify_keys; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#309 + def deep_stringify_keys!; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#316 + def deep_symbolize_keys; end + + # Same as Hash#default where the key passed as argument can be + # either a string or a symbol: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new(1) + # hash.default # => 1 + # + # hash = ActiveSupport::HashWithIndifferentAccess.new { |hash, key| key } + # hash.default # => nil + # hash.default('foo') # => 'foo' + # hash.default(:foo) # => 'foo' + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#221 + def default(*args); end + + # Removes the specified key from the hash. + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#295 + def delete(key); end + + # Same as Hash#dig where the key passed as argument can be + # either a string or a symbol: + # + # counters = ActiveSupport::HashWithIndifferentAccess.new + # counters[:foo] = { bar: 1 } + # + # counters.dig('foo', 'bar') # => 1 + # counters.dig(:foo, :bar) # => 1 + # counters.dig(:zoo) # => nil + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#206 + def dig(*args); end + + # Returns a shallow copy of the hash. + # + # hash = ActiveSupport::HashWithIndifferentAccess.new({ a: { b: 'b' } }) + # dup = hash.dup + # dup[:a][:c] = 'c' + # + # hash[:a][:c] # => "c" + # dup[:a][:c] # => "c" + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#256 + def dup; end + + # Returns a hash with indifferent access that includes everything except given keys. + # hash = { a: "x", b: "y", c: 10 }.with_indifferent_access + # hash.except(:a, "b") # => {c: 10}.with_indifferent_access + # hash # => { a: "x", b: "y", c: 10 }.with_indifferent_access + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#303 + def except(*keys); end + + # Returns +true+ so that Array#extract_options! finds members of + # this class. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#56 + def extractable_options?; end + + # Same as Hash#fetch where the key passed as argument can be + # either a string or a symbol: + # + # counters = ActiveSupport::HashWithIndifferentAccess.new + # counters[:foo] = 1 + # + # counters.fetch('foo') # => 1 + # counters.fetch(:bar, 0) # => 0 + # counters.fetch(:bar) { |key| 0 } # => 0 + # counters.fetch(:zoo) # => KeyError: key not found: "zoo" + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#193 + def fetch(key, *extras); end + + # Returns an array of the values at the specified indices, but also + # raises an exception when one of the keys can't be found. + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash[:a] = 'x' + # hash[:b] = 'y' + # hash.fetch_values('a', 'b') # => ["x", "y"] + # hash.fetch_values('a', 'c') { |key| 'z' } # => ["x", "z"] + # hash.fetch_values('a', 'c') # => KeyError: key not found: "c" + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#244 + def fetch_values(*indices, &block); end + + # Checks the hash for a key matching the argument passed in: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash['key'] = 'value' + # hash.key?(:key) # => true + # hash.key?('key') # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#149 + def has_key?(key); end + + # Checks the hash for a key matching the argument passed in: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash['key'] = 'value' + # hash.key?(:key) # => true + # hash.key?('key') # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#149 + def include?(key); end + + # Checks the hash for a key matching the argument passed in: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash['key'] = 'value' + # hash.key?(:key) # => true + # hash.key?('key') # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#149 + def key?(key); end + + # Checks the hash for a key matching the argument passed in: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash['key'] = 'value' + # hash.key?(:key) # => true + # hash.key?('key') # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#149 + def member?(key); end + + # This method has the same semantics of +update+, except it does not + # modify the receiver but rather returns a new hash with indifferent + # access with the result of the merge. + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#265 + def merge(*hashes, &block); end + + # Updates the receiver in-place, merging in the hashes passed as arguments: + # + # hash_1 = ActiveSupport::HashWithIndifferentAccess.new + # hash_1[:key] = 'value' + # + # hash_2 = ActiveSupport::HashWithIndifferentAccess.new + # hash_2[:key] = 'New Value!' + # + # hash_1.update(hash_2) # => {"key"=>"New Value!"} + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash.update({ "a" => 1 }, { "b" => 2 }) # => { "a" => 1, "b" => 2 } + # + # The arguments can be either an + # ActiveSupport::HashWithIndifferentAccess or a regular +Hash+. + # In either case the merge respects the semantics of indifferent access. + # + # If the argument is a regular hash with keys +:key+ and "key" only one + # of the values end up in the receiver, but which one is unspecified. + # + # When given a block, the value for duplicated keys will be determined + # by the result of invoking the block with the duplicated key, the value + # in the receiver, and the value in +other_hash+. The rules for duplicated + # keys follow the semantics of indifferent access: + # + # hash_1[:key] = 10 + # hash_2['key'] = 12 + # hash_1.update(hash_2) { |key, old, new| old + new } # => {"key"=>22} + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#130 + def merge!(*other_hashes, &block); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#64 + def nested_under_indifferent_access; end + + def regular_update(*_arg0); end + def regular_writer(_arg0, _arg1); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#324 + def reject(*args, &block); end + + # Replaces the contents of this hash with other_hash. + # + # h = { "a" => 100, "b" => 200 } + # h.replace({ "c" => 300, "d" => 400 }) # => {"c"=>300, "d"=>400} + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#290 + def replace(other_hash); end + + # Like +merge+ but the other way around: Merges the receiver into the + # argument and returns a new hash with indifferent access as result: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash['a'] = nil + # hash.reverse_merge(a: 0, b: 1) # => {"a"=>nil, "b"=>1} + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#275 + def reverse_merge(other_hash); end + + # Same semantics as +reverse_merge+ but modifies the receiver in-place. + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#281 + def reverse_merge!(other_hash); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#319 + def select(*args, &block); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#347 + def slice(*keys); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#352 + def slice!(*keys); end + + # Assigns a new value to the hash: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash[:key] = 'value' + # + # This value can be later fetched using either +:key+ or 'key'. + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#96 + def store(key, value); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#310 + def stringify_keys; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#308 + def stringify_keys!; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#314 + def symbolize_keys; end + + # Convert to a regular hash with string keys. + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#362 + def to_hash; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#314 + def to_options; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#317 + def to_options!; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#334 + def transform_keys(*args, &block); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#339 + def transform_keys!; end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#329 + def transform_values(*args, &block); end + + # Updates the receiver in-place, merging in the hashes passed as arguments: + # + # hash_1 = ActiveSupport::HashWithIndifferentAccess.new + # hash_1[:key] = 'value' + # + # hash_2 = ActiveSupport::HashWithIndifferentAccess.new + # hash_2[:key] = 'New Value!' + # + # hash_1.update(hash_2) # => {"key"=>"New Value!"} + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash.update({ "a" => 1 }, { "b" => 2 }) # => { "a" => 1, "b" => 2 } + # + # The arguments can be either an + # ActiveSupport::HashWithIndifferentAccess or a regular +Hash+. + # In either case the merge respects the semantics of indifferent access. + # + # If the argument is a regular hash with keys +:key+ and "key" only one + # of the values end up in the receiver, but which one is unspecified. + # + # When given a block, the value for duplicated keys will be determined + # by the result of invoking the block with the duplicated key, the value + # in the receiver, and the value in +other_hash+. The rules for duplicated + # keys follow the semantics of indifferent access: + # + # hash_1[:key] = 10 + # hash_2['key'] = 12 + # hash_1.update(hash_2) { |key, old, new| old + new } # => {"key"=>22} + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#130 + def update(*other_hashes, &block); end + + # Returns an array of the values at the specified indices: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash[:a] = 'x' + # hash[:b] = 'y' + # hash.values_at('a', 'b') # => ["x", "y"] + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#231 + def values_at(*keys); end + + # Like +merge+ but the other way around: Merges the receiver into the + # argument and returns a new hash with indifferent access as result: + # + # hash = ActiveSupport::HashWithIndifferentAccess.new + # hash['a'] = nil + # hash.reverse_merge(a: 0, b: 1) # => {"a"=>nil, "b"=>1} + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#275 + def with_defaults(other_hash); end + + # Same semantics as +reverse_merge+ but modifies the receiver in-place. + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#281 + def with_defaults!(other_hash); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#60 + def with_indifferent_access; end + + # Returns a hash with indifferent access that includes everything except given keys. + # hash = { a: "x", b: "y", c: 10 }.with_indifferent_access + # hash.except(:a, "b") # => {c: 10}.with_indifferent_access + # hash # => { a: "x", b: "y", c: 10 }.with_indifferent_access + # + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#303 + def without(*keys); end + + private + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#374 + def convert_key(key); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#383 + def convert_value(value, conversion: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#400 + def set_defaults(target); end + + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#408 + def update_with_single_argument(other_hash, block); end + + class << self + # source://activesupport//lib/active_support/hash_with_indifferent_access.rb#83 + def [](*args); end + end +end + +# source://activesupport//lib/active_support/html_safe_translation.rb#4 +module ActiveSupport::HtmlSafeTranslation + extend ::ActiveSupport::HtmlSafeTranslation + + # source://activesupport//lib/active_support/html_safe_translation.rb#7 + def translate(key, **options); end + + private + + # source://activesupport//lib/active_support/html_safe_translation.rb#22 + def html_escape_translation_options(options); end + + # source://activesupport//lib/active_support/html_safe_translation.rb#35 + def html_safe_translation(translation); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/html_safe_translation.rb#18 + def html_safe_translation_key?(key); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/html_safe_translation.rb#30 + def i18n_option?(name); end +end + +# The Inflector transforms words from singular to plural, class names to table +# names, modularized class names to ones without, and class names to foreign +# keys. The default inflections for pluralization, singularization, and +# uncountable words are kept in inflections.rb. +# +# The Rails core team has stated patches for the inflections library will not +# be accepted in order to avoid breaking legacy applications which may be +# relying on errant inflections. If you discover an incorrect inflection and +# require it for your application or wish to define rules for languages other +# than English, please correct or add them yourself (explained below). +# +# source://activesupport//lib/active_support/inflector/inflections.rb#7 +module ActiveSupport::Inflector + extend ::ActiveSupport::Inflector + + # Converts strings to UpperCamelCase. + # If the +uppercase_first_letter+ parameter is set to false, then produces + # lowerCamelCase. + # + # Also converts '/' to '::' which is useful for converting + # paths to namespaces. + # + # camelize('active_model') # => "ActiveModel" + # camelize('active_model', false) # => "activeModel" + # camelize('active_model/errors') # => "ActiveModel::Errors" + # camelize('active_model/errors', false) # => "activeModel::Errors" + # + # As a rule of thumb you can think of +camelize+ as the inverse of + # #underscore, though there are cases where that does not hold: + # + # camelize(underscore('SSLError')) # => "SslError" + # + # source://activesupport//lib/active_support/inflector/methods.rb#69 + def camelize(term, uppercase_first_letter = T.unsafe(nil)); end + + # Creates a class name from a plural table name like Rails does for table + # names to models. Note that this returns a string and not a Class (To + # convert to an actual class follow +classify+ with #constantize). + # + # classify('ham_and_eggs') # => "HamAndEgg" + # classify('posts') # => "Post" + # + # Singular names are not handled correctly: + # + # classify('calculus') # => "Calculu" + # + # source://activesupport//lib/active_support/inflector/methods.rb#208 + def classify(table_name); end + + # Tries to find a constant with the name specified in the argument string. + # + # constantize('Module') # => Module + # constantize('Foo::Bar') # => Foo::Bar + # + # The name is assumed to be the one of a top-level constant, no matter + # whether it starts with "::" or not. No lexical context is taken into + # account: + # + # C = 'outside' + # module M + # C = 'inside' + # C # => 'inside' + # constantize('C') # => 'outside', same as ::C + # end + # + # NameError is raised when the name is not in CamelCase or the constant is + # unknown. + # + # source://activesupport//lib/active_support/inflector/methods.rb#279 + def constantize(camel_cased_word); end + + # Replaces underscores with dashes in the string. + # + # dasherize('puni_puni') # => "puni-puni" + # + # source://activesupport//lib/active_support/inflector/methods.rb#216 + def dasherize(underscored_word); end + + # Removes the rightmost segment from the constant expression in the string. + # + # deconstantize('Net::HTTP') # => "Net" + # deconstantize('::Net::HTTP') # => "::Net" + # deconstantize('String') # => "" + # deconstantize('::String') # => "" + # deconstantize('') # => "" + # + # See also #demodulize. + # + # source://activesupport//lib/active_support/inflector/methods.rb#246 + def deconstantize(path); end + + # Removes the module part from the expression in the string. + # + # demodulize('ActiveSupport::Inflector::Inflections') # => "Inflections" + # demodulize('Inflections') # => "Inflections" + # demodulize('::Inflections') # => "Inflections" + # demodulize('') # => "" + # + # See also #deconstantize. + # + # source://activesupport//lib/active_support/inflector/methods.rb#228 + def demodulize(path); end + + # Creates a foreign key name from a class name. + # +separate_class_name_and_id_with_underscore+ sets whether + # the method should put '_' between the name and 'id'. + # + # foreign_key('Message') # => "message_id" + # foreign_key('Message', false) # => "messageid" + # foreign_key('Admin::Post') # => "post_id" + # + # source://activesupport//lib/active_support/inflector/methods.rb#257 + def foreign_key(class_name, separate_class_name_and_id_with_underscore = T.unsafe(nil)); end + + # Tweaks an attribute name for display to end users. + # + # Specifically, performs these transformations: + # + # * Applies human inflection rules to the argument. + # * Deletes leading underscores, if any. + # * Removes an "_id" suffix if present. + # * Replaces underscores with spaces, if any. + # * Downcases all words except acronyms. + # * Capitalizes the first word. + # The capitalization of the first word can be turned off by setting the + # +:capitalize+ option to false (default is true). + # + # The trailing '_id' can be kept and capitalized by setting the + # optional parameter +keep_id_suffix+ to true (default is false). + # + # humanize('employee_salary') # => "Employee salary" + # humanize('author_id') # => "Author" + # humanize('author_id', capitalize: false) # => "author" + # humanize('_id') # => "Id" + # humanize('author_id', keep_id_suffix: true) # => "Author id" + # + # If "SSL" was defined to be an acronym: + # + # humanize('ssl_error') # => "SSL error" + # + # source://activesupport//lib/active_support/inflector/methods.rb#132 + def humanize(lower_case_and_underscored_word, capitalize: T.unsafe(nil), keep_id_suffix: T.unsafe(nil)); end + + # Yields a singleton instance of Inflector::Inflections so you can specify + # additional inflector rules. If passed an optional locale, rules for other + # languages can be specified. If not specified, defaults to :en. + # Only rules for English are provided. + # + # ActiveSupport::Inflector.inflections(:en) do |inflect| + # inflect.uncountable 'rails' + # end + # + # source://activesupport//lib/active_support/inflector/inflections.rb#263 + def inflections(locale = T.unsafe(nil)); end + + # Returns the suffix that should be added to a number to denote the position + # in an ordered sequence such as 1st, 2nd, 3rd, 4th. + # + # ordinal(1) # => "st" + # ordinal(2) # => "nd" + # ordinal(1002) # => "nd" + # ordinal(1003) # => "rd" + # ordinal(-11) # => "th" + # ordinal(-1021) # => "st" + # + # source://activesupport//lib/active_support/inflector/methods.rb#324 + def ordinal(number); end + + # Turns a number into an ordinal string used to denote the position in an + # ordered sequence such as 1st, 2nd, 3rd, 4th. + # + # ordinalize(1) # => "1st" + # ordinalize(2) # => "2nd" + # ordinalize(1002) # => "1002nd" + # ordinalize(1003) # => "1003rd" + # ordinalize(-11) # => "-11th" + # ordinalize(-1021) # => "-1021st" + # + # source://activesupport//lib/active_support/inflector/methods.rb#337 + def ordinalize(number); end + + # Replaces special characters in a string so that it may be used as part of + # a 'pretty' URL. + # + # parameterize("Donald E. Knuth") # => "donald-e-knuth" + # parameterize("^très|Jolie-- ") # => "tres-jolie" + # + # To use a custom separator, override the +separator+ argument. + # + # parameterize("Donald E. Knuth", separator: '_') # => "donald_e_knuth" + # parameterize("^très|Jolie__ ", separator: '_') # => "tres_jolie" + # + # To preserve the case of the characters in a string, use the +preserve_case+ argument. + # + # parameterize("Donald E. Knuth", preserve_case: true) # => "Donald-E-Knuth" + # parameterize("^très|Jolie-- ", preserve_case: true) # => "tres-Jolie" + # + # It preserves dashes and underscores unless they are used as separators: + # + # parameterize("^très|Jolie__ ") # => "tres-jolie__" + # parameterize("^très|Jolie-- ", separator: "_") # => "tres_jolie--" + # parameterize("^très_Jolie-- ", separator: ".") # => "tres_jolie--" + # + # If the optional parameter +locale+ is specified, + # the word will be parameterized as a word of that language. + # By default, this parameter is set to nil and it will use + # the configured I18n.locale. + # + # source://activesupport//lib/active_support/inflector/transliterate.rb#121 + def parameterize(string, separator: T.unsafe(nil), preserve_case: T.unsafe(nil), locale: T.unsafe(nil)); end + + # Returns the plural form of the word in the string. + # + # If passed an optional +locale+ parameter, the word will be + # pluralized using rules defined for that language. By default, + # this parameter is set to :en. + # + # pluralize('post') # => "posts" + # pluralize('octopus') # => "octopi" + # pluralize('sheep') # => "sheep" + # pluralize('words') # => "words" + # pluralize('CamelOctopus') # => "CamelOctopi" + # pluralize('ley', :es) # => "leyes" + # + # source://activesupport//lib/active_support/inflector/methods.rb#32 + def pluralize(word, locale = T.unsafe(nil)); end + + # Tries to find a constant with the name specified in the argument string. + # + # safe_constantize('Module') # => Module + # safe_constantize('Foo::Bar') # => Foo::Bar + # + # The name is assumed to be the one of a top-level constant, no matter + # whether it starts with "::" or not. No lexical context is taken into + # account: + # + # C = 'outside' + # module M + # C = 'inside' + # C # => 'inside' + # safe_constantize('C') # => 'outside', same as ::C + # end + # + # +nil+ is returned when the name is not in CamelCase or the constant (or + # part of it) is unknown. + # + # safe_constantize('blargle') # => nil + # safe_constantize('UnknownModule') # => nil + # safe_constantize('UnknownModule::Foo::Bar') # => nil + # + # source://activesupport//lib/active_support/inflector/methods.rb#305 + def safe_constantize(camel_cased_word); end + + # The reverse of #pluralize, returns the singular form of a word in a + # string. + # + # If passed an optional +locale+ parameter, the word will be + # singularized using rules defined for that language. By default, + # this parameter is set to :en. + # + # singularize('posts') # => "post" + # singularize('octopi') # => "octopus" + # singularize('sheep') # => "sheep" + # singularize('word') # => "word" + # singularize('CamelOctopi') # => "CamelOctopus" + # singularize('leyes', :es) # => "ley" + # + # source://activesupport//lib/active_support/inflector/methods.rb#49 + def singularize(word, locale = T.unsafe(nil)); end + + # Creates the name of a table like Rails does for models to table names. + # This method uses the #pluralize method on the last word in the string. + # + # tableize('RawScaledScorer') # => "raw_scaled_scorers" + # tableize('ham_and_egg') # => "ham_and_eggs" + # tableize('fancyCategory') # => "fancy_categories" + # + # source://activesupport//lib/active_support/inflector/methods.rb#194 + def tableize(class_name); end + + # Capitalizes all the words and replaces some characters in the string to + # create a nicer looking title. +titleize+ is meant for creating pretty + # output. It is not used in the Rails internals. + # + # The trailing '_id','Id'.. can be kept and capitalized by setting the + # optional parameter +keep_id_suffix+ to true. + # By default, this parameter is false. + # + # +titleize+ is also aliased as +titlecase+. + # + # titleize('man from the boondocks') # => "Man From The Boondocks" + # titleize('x-men: the last stand') # => "X Men: The Last Stand" + # titleize('TheManWithoutAPast') # => "The Man Without A Past" + # titleize('raiders_of_the_lost_ark') # => "Raiders Of The Lost Ark" + # titleize('string_ending_with_id', keep_id_suffix: true) # => "String Ending With Id" + # + # source://activesupport//lib/active_support/inflector/methods.rb#182 + def titleize(word, keep_id_suffix: T.unsafe(nil)); end + + # Replaces non-ASCII characters with an ASCII approximation, or if none + # exists, a replacement character which defaults to "?". + # + # transliterate('Ærøskøbing') + # # => "AEroskobing" + # + # Default approximations are provided for Western/Latin characters, + # e.g, "ø", "ñ", "é", "ß", etc. + # + # This method is I18n aware, so you can set up custom approximations for a + # locale. This can be useful, for example, to transliterate German's "ü" + # and "ö" to "ue" and "oe", or to add support for transliterating Russian + # to ASCII. + # + # In order to make your custom transliterations available, you must set + # them as the i18n.transliterate.rule i18n key: + # + # # Store the transliterations in locales/de.yml + # i18n: + # transliterate: + # rule: + # ü: "ue" + # ö: "oe" + # + # # Or set them using Ruby + # I18n.backend.store_translations(:de, i18n: { + # transliterate: { + # rule: { + # 'ü' => 'ue', + # 'ö' => 'oe' + # } + # } + # }) + # + # The value for i18n.transliterate.rule can be a simple Hash that + # maps characters to ASCII approximations as shown above, or, for more + # complex requirements, a Proc: + # + # I18n.backend.store_translations(:de, i18n: { + # transliterate: { + # rule: ->(string) { MyTransliterator.transliterate(string) } + # } + # }) + # + # Now you can have different transliterations for each locale: + # + # transliterate('Jürgen', locale: :en) + # # => "Jurgen" + # + # transliterate('Jürgen', locale: :de) + # # => "Juergen" + # + # Transliteration is restricted to UTF-8, US-ASCII, and GB18030 strings. + # Other encodings will raise an ArgumentError. + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/inflector/transliterate.rb#64 + def transliterate(string, replacement = T.unsafe(nil), locale: T.unsafe(nil)); end + + # Makes an underscored, lowercase form from the expression in the string. + # + # Changes '::' to '/' to convert namespaces to paths. + # + # underscore('ActiveModel') # => "active_model" + # underscore('ActiveModel::Errors') # => "active_model/errors" + # + # As a rule of thumb you can think of +underscore+ as the inverse of + # #camelize, though there are cases where that does not hold: + # + # camelize(underscore('SSLError')) # => "SslError" + # + # source://activesupport//lib/active_support/inflector/methods.rb#96 + def underscore(camel_cased_word); end + + # Converts just the first character to uppercase. + # + # upcase_first('what a Lovely Day') # => "What a Lovely Day" + # upcase_first('w') # => "W" + # upcase_first('') # => "" + # + # source://activesupport//lib/active_support/inflector/methods.rb#163 + def upcase_first(string); end + + private + + # Applies inflection rules for +singularize+ and +pluralize+. + # + # If passed an optional +locale+ parameter, the uncountables will be + # found for that locale. + # + # apply_inflections('post', inflections.plurals, :en) # => "posts" + # apply_inflections('posts', inflections.singulars, :en) # => "post" + # + # source://activesupport//lib/active_support/inflector/methods.rb#366 + def apply_inflections(word, rules, locale = T.unsafe(nil)); end + + # Mounts a regular expression, returned as a string to ease interpolation, + # that will match part by part the given constant. + # + # const_regexp("Foo::Bar::Baz") # => "Foo(::Bar(::Baz)?)?" + # const_regexp("::") # => "::" + # + # source://activesupport//lib/active_support/inflector/methods.rb#347 + def const_regexp(camel_cased_word); end +end + +# source://activesupport//lib/active_support/inflector/transliterate.rb#8 +ActiveSupport::Inflector::ALLOWED_ENCODINGS_FOR_TRANSLITERATE = T.let(T.unsafe(nil), Array) + +# A singleton instance of this class is yielded by Inflector.inflections, +# which can then be used to specify additional inflection rules. If passed +# an optional locale, rules for other languages can be specified. The +# default locale is :en. Only rules for English are provided. +# +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, '\1\2en' +# inflect.singular /^(ox)en/i, '\1' +# +# inflect.irregular 'cactus', 'cacti' +# +# inflect.uncountable 'equipment' +# end +# +# New rules are added at the top. So in the example above, the irregular +# rule for cactus will now be the first of the pluralization and +# singularization rules that is runs. This guarantees that your rules run +# before any of the rules that may already have been loaded. +# +# source://activesupport//lib/active_support/inflector/inflections.rb#28 +class ActiveSupport::Inflector::Inflections + # @return [Inflections] a new instance of Inflections + # + # source://activesupport//lib/active_support/inflector/inflections.rb#78 + def initialize; end + + # Specifies a new acronym. An acronym must be specified as it will appear + # in a camelized string. An underscore string that contains the acronym + # will retain the acronym when passed to +camelize+, +humanize+, or + # +titleize+. A camelized string that contains the acronym will maintain + # the acronym when titleized or humanized, and will convert the acronym + # into a non-delimited single lowercase word when passed to +underscore+. + # + # acronym 'HTML' + # titleize 'html' # => 'HTML' + # camelize 'html' # => 'HTML' + # underscore 'MyHTML' # => 'my_html' + # + # The acronym, however, must occur as a delimited unit and not be part of + # another word for conversions to recognize it: + # + # acronym 'HTTP' + # camelize 'my_http_delimited' # => 'MyHTTPDelimited' + # camelize 'https' # => 'Https', not 'HTTPs' + # underscore 'HTTPS' # => 'http_s', not 'https' + # + # acronym 'HTTPS' + # camelize 'https' # => 'HTTPS' + # underscore 'HTTPS' # => 'https' + # + # Note: Acronyms that are passed to +pluralize+ will no longer be + # recognized, since the acronym will not occur as a delimited unit in the + # pluralized result. To work around this, you must specify the pluralized + # form as an acronym as well: + # + # acronym 'API' + # camelize(pluralize('api')) # => 'Apis' + # + # acronym 'APIs' + # camelize(pluralize('api')) # => 'APIs' + # + # +acronym+ may be used to specify any word that contains an acronym or + # otherwise needs to maintain a non-standard capitalization. The only + # restriction is that the word must begin with a capital letter. + # + # acronym 'RESTful' + # underscore 'RESTful' # => 'restful' + # underscore 'RESTfulController' # => 'restful_controller' + # titleize 'RESTfulController' # => 'RESTful Controller' + # camelize 'restful' # => 'RESTful' + # camelize 'restful_controller' # => 'RESTfulController' + # + # acronym 'McDonald' + # underscore 'McDonald' # => 'mcdonald' + # camelize 'mcdonald' # => 'McDonald' + # + # source://activesupport//lib/active_support/inflector/inflections.rb#140 + def acronym(word); end + + # Returns the value of attribute acronyms. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#74 + def acronyms; end + + # source://activesupport//lib/active_support/inflector/inflections.rb#76 + def acronyms_camelize_regex; end + + # source://activesupport//lib/active_support/inflector/inflections.rb#76 + def acronyms_underscore_regex; end + + # Clears the loaded inflections within a given scope (default is + # :all). Give the scope as a symbol of the inflection type, the + # options are: :plurals, :singulars, :uncountables, + # :humans, :acronyms. + # + # clear :all + # clear :plurals + # + # source://activesupport//lib/active_support/inflector/inflections.rb#229 + def clear(scope = T.unsafe(nil)); end + + # Specifies a humanized form of a string by a regular expression rule or + # by a string mapping. When using a regular expression based replacement, + # the normal humanize formatting is called after the replacement. When a + # string is used, the human form should be specified as desired (example: + # 'The name', not 'the_name'). + # + # human /_cnt$/i, '\1_count' + # human 'legacy_col_person_name', 'Name' + # + # source://activesupport//lib/active_support/inflector/inflections.rb#218 + def human(rule, replacement); end + + # Returns the value of attribute humans. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#74 + def humans; end + + # Specifies a new irregular that applies to both pluralization and + # singularization at the same time. This can only be used for strings, not + # regular expressions. You simply pass the irregular in singular and + # plural form. + # + # irregular 'cactus', 'cacti' + # irregular 'person', 'people' + # + # source://activesupport//lib/active_support/inflector/inflections.rb#172 + def irregular(singular, plural); end + + # Specifies a new pluralization rule and its replacement. The rule can + # either be a string or a regular expression. The replacement should + # always be a string that may include references to the matched data from + # the rule. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#149 + def plural(rule, replacement); end + + # Returns the value of attribute plurals. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#74 + def plurals; end + + # Specifies a new singularization rule and its replacement. The rule can + # either be a string or a regular expression. The replacement should + # always be a string that may include references to the matched data from + # the rule. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#159 + def singular(rule, replacement); end + + # Returns the value of attribute singulars. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#74 + def singulars; end + + # Specifies words that are uncountable and should not be inflected. + # + # uncountable 'money' + # uncountable 'money', 'information' + # uncountable %w( money information rice ) + # + # source://activesupport//lib/active_support/inflector/inflections.rb#206 + def uncountable(*words); end + + # Returns the value of attribute uncountables. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#74 + def uncountables; end + + private + + # source://activesupport//lib/active_support/inflector/inflections.rb#248 + def define_acronym_regex_patterns; end + + # Private, for the test suite. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#84 + def initialize_dup(orig); end + + class << self + # source://activesupport//lib/active_support/inflector/inflections.rb#63 + def instance(locale = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#67 + def instance_or_fallback(locale); end + end +end + +# source://activesupport//lib/active_support/inflector/inflections.rb#31 +class ActiveSupport::Inflector::Inflections::Uncountables < ::Array + # @return [Uncountables] a new instance of Uncountables + # + # source://activesupport//lib/active_support/inflector/inflections.rb#32 + def initialize; end + + # source://activesupport//lib/active_support/inflector/inflections.rb#42 + def <<(*word); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#46 + def add(words); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#37 + def delete(entry); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/inflector/inflections.rb#53 + def uncountable?(str); end + + private + + # source://activesupport//lib/active_support/inflector/inflections.rb#58 + def to_regex(string); end +end + +# +InheritableOptions+ provides a constructor to build an OrderedOptions +# hash inherited from another hash. +# +# Use this if you already have some hash and you want to create a new one based on it. +# +# h = ActiveSupport::InheritableOptions.new({ girl: 'Mary', boy: 'John' }) +# h.girl # => 'Mary' +# h.boy # => 'John' +# +# source://activesupport//lib/active_support/ordered_options.rb#79 +class ActiveSupport::InheritableOptions < ::ActiveSupport::OrderedOptions + # @return [InheritableOptions] a new instance of InheritableOptions + # + # source://activesupport//lib/active_support/ordered_options.rb#80 + def initialize(parent = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/ordered_options.rb#91 + def inheritable_copy; end +end + +# source://activesupport//lib/active_support/isolated_execution_state.rb#6 +module ActiveSupport::IsolatedExecutionState + class << self + # source://activesupport//lib/active_support/isolated_execution_state.rb#32 + def [](key); end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#36 + def []=(key, value); end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#48 + def clear; end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#44 + def delete(key); end + + # Returns the value of attribute isolation_level. + # + # source://activesupport//lib/active_support/isolated_execution_state.rb#13 + def isolation_level; end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#15 + def isolation_level=(level); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/isolated_execution_state.rb#40 + def key?(key); end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#52 + def share_with(other); end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#28 + def unique_id; end + + private + + # source://activesupport//lib/active_support/isolated_execution_state.rb#61 + def current; end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#65 + def current_fiber; end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#61 + def current_thread; end + end +end + +# source://activesupport//lib/active_support/json/decoding.rb#11 +module ActiveSupport::JSON + class << self + # Parses a JSON string (JavaScript Object Notation) into a hash. + # See http://www.json.org for more info. + # + # ActiveSupport::JSON.decode("{\"team\":\"rails\",\"players\":\"36\"}") + # => {"team" => "rails", "players" => "36"} + # + # source://activesupport//lib/active_support/json/decoding.rb#22 + def decode(json); end + + # Dumps objects in JSON (JavaScript Object Notation). + # See http://www.json.org for more info. + # + # ActiveSupport::JSON.encode({ team: 'rails', players: '36' }) + # # => "{\"team\":\"rails\",\"players\":\"36\"}" + # + # source://activesupport//lib/active_support/json/encoding.rb#21 + def encode(value, options = T.unsafe(nil)); end + + # Returns the class of the error that will be raised when there is an + # error in decoding JSON. Using this method means you won't directly + # depend on the ActiveSupport's JSON implementation, in case it changes + # in the future. + # + # begin + # obj = ActiveSupport::JSON.decode(some_string) + # rescue ActiveSupport::JSON.parse_error + # Rails.logger.warn("Attempted to decode invalid JSON: #{some_string}") + # end + # + # source://activesupport//lib/active_support/json/decoding.rb#42 + def parse_error; end + + private + + # source://activesupport//lib/active_support/json/decoding.rb#47 + def convert_dates_from(data); end + end +end + +# source://activesupport//lib/active_support/json/decoding.rb#14 +ActiveSupport::JSON::DATETIME_REGEX = T.let(T.unsafe(nil), Regexp) + +# matches YAML-formatted dates +# +# source://activesupport//lib/active_support/json/decoding.rb#13 +ActiveSupport::JSON::DATE_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/json/encoding.rb#25 +module ActiveSupport::JSON::Encoding + class << self + # If true, encode >, <, & as escaped unicode sequences (e.g. > as \u003e) + # as a safety measure. + # + # source://activesupport//lib/active_support/json/encoding.rb#121 + def escape_html_entities_in_json; end + + # If true, encode >, <, & as escaped unicode sequences (e.g. > as \u003e) + # as a safety measure. + # + # source://activesupport//lib/active_support/json/encoding.rb#121 + def escape_html_entities_in_json=(_arg0); end + + # Sets the encoder used by Rails to encode Ruby objects into JSON strings + # in +Object#to_json+ and +ActiveSupport::JSON.encode+. + # + # source://activesupport//lib/active_support/json/encoding.rb#129 + def json_encoder; end + + # Sets the encoder used by Rails to encode Ruby objects into JSON strings + # in +Object#to_json+ and +ActiveSupport::JSON.encode+. + # + # source://activesupport//lib/active_support/json/encoding.rb#129 + def json_encoder=(_arg0); end + + # Sets the precision of encoded time values. + # Defaults to 3 (equivalent to millisecond precision) + # + # source://activesupport//lib/active_support/json/encoding.rb#125 + def time_precision; end + + # Sets the precision of encoded time values. + # Defaults to 3 (equivalent to millisecond precision) + # + # source://activesupport//lib/active_support/json/encoding.rb#125 + def time_precision=(_arg0); end + + # If true, use ISO 8601 format for dates and times. Otherwise, fall back + # to the Active Support legacy format. + # + # source://activesupport//lib/active_support/json/encoding.rb#117 + def use_standard_json_time_format; end + + # If true, use ISO 8601 format for dates and times. Otherwise, fall back + # to the Active Support legacy format. + # + # source://activesupport//lib/active_support/json/encoding.rb#117 + def use_standard_json_time_format=(_arg0); end + end +end + +# source://activesupport//lib/active_support/json/encoding.rb#26 +class ActiveSupport::JSON::Encoding::JSONGemEncoder + # @return [JSONGemEncoder] a new instance of JSONGemEncoder + # + # source://activesupport//lib/active_support/json/encoding.rb#29 + def initialize(options = T.unsafe(nil)); end + + # Encode the given object into a JSON string + # + # source://activesupport//lib/active_support/json/encoding.rb#34 + def encode(value); end + + # Returns the value of attribute options. + # + # source://activesupport//lib/active_support/json/encoding.rb#27 + def options; end + + private + + # Convert an object into a "JSON-ready" representation composed of + # primitives like Hash, Array, String, Numeric, + # and +true+/+false+/+nil+. + # Recursively calls #as_json to the object to recursively build a + # fully JSON-ready object. + # + # This allows developers to implement #as_json without having to + # worry about what base types of objects they are allowed to return + # or having to remember to call #as_json recursively. + # + # Note: the +options+ hash passed to +object.to_json+ is only passed + # to +object.as_json+, not any of this method's recursive +#as_json+ + # calls. + # + # source://activesupport//lib/active_support/json/encoding.rb#89 + def jsonify(value); end + + # Encode a "jsonified" Ruby data structure using the JSON gem + # + # source://activesupport//lib/active_support/json/encoding.rb#109 + def stringify(jsonified); end +end + +# Rails does more escaping than the JSON gem natively does (we +# escape \u2028 and \u2029 and optionally >, <, & to work around +# certain browser problems). +# +# source://activesupport//lib/active_support/json/encoding.rb#42 +ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPED_CHARS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/json/encoding.rb#51 +ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPE_REGEX_WITHOUT_HTML_ENTITIES = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/json/encoding.rb#50 +ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPE_REGEX_WITH_HTML_ENTITIES = T.let(T.unsafe(nil), Regexp) + +# This class wraps all the strings we see and does the extra escaping +# +# source://activesupport//lib/active_support/json/encoding.rb#54 +class ActiveSupport::JSON::Encoding::JSONGemEncoder::EscapedString < ::String + # source://activesupport//lib/active_support/json/encoding.rb#55 + def to_json(*_arg0); end + + # source://activesupport//lib/active_support/json/encoding.rb#67 + def to_s; end +end + +# KeyGenerator is a simple wrapper around OpenSSL's implementation of PBKDF2. +# It can be used to derive a number of keys for various purposes from a given secret. +# This lets Rails applications have a single secure secret, but avoid reusing that +# key in multiple incompatible contexts. +# +# source://activesupport//lib/active_support/key_generator.rb#11 +class ActiveSupport::KeyGenerator + # @return [KeyGenerator] a new instance of KeyGenerator + # + # source://activesupport//lib/active_support/key_generator.rb#26 + def initialize(secret, options = T.unsafe(nil)); end + + # Returns a derived key suitable for use. The default +key_size+ is chosen + # to be compatible with the default settings of ActiveSupport::MessageVerifier. + # i.e. OpenSSL::Digest::SHA1#block_length + # + # source://activesupport//lib/active_support/key_generator.rb#39 + def generate_key(salt, key_size = T.unsafe(nil)); end + + class << self + # source://activesupport//lib/active_support/key_generator.rb#21 + def hash_digest_class; end + + # source://activesupport//lib/active_support/key_generator.rb#13 + def hash_digest_class=(klass); end + end +end + +# LazyLoadHooks allows Rails to lazily load a lot of components and thus +# making the app boot faster. Because of this feature now there is no need to +# require ActiveRecord::Base at boot time purely to apply +# configuration. Instead a hook is registered that applies configuration once +# ActiveRecord::Base is loaded. Here ActiveRecord::Base is +# used as example but this feature can be applied elsewhere too. +# +# Here is an example where on_load method is called to register a hook. +# +# initializer 'active_record.initialize_timezone' do +# ActiveSupport.on_load(:active_record) do +# self.time_zone_aware_attributes = true +# self.default_timezone = :utc +# end +# end +# +# When the entirety of +ActiveRecord::Base+ has been +# evaluated then run_load_hooks is invoked. The very last line of +# +ActiveRecord::Base+ is: +# +# ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base) +# +# run_load_hooks will then execute all the hooks that were registered +# with the on_load method. In the case of the above example, it will +# execute the block of code that is in the +initializer+. +# +# Registering a hook that has already run results in that hook executing +# immediately. This allows hooks to be nested for code that relies on +# multiple lazily loaded components: +# +# initializer "action_text.renderer" do +# ActiveSupport.on_load(:action_controller_base) do +# ActiveSupport.on_load(:action_text_content) do +# self.default_renderer = Class.new(ActionController::Base).renderer +# end +# end +# end +# +# source://activesupport//lib/active_support/lazy_load_hooks.rb#41 +module ActiveSupport::LazyLoadHooks + # Declares a block that will be executed when a Rails component is fully + # loaded. If the component has already loaded, the block is executed + # immediately. + # + # Options: + # + # * :yield - Yields the object that run_load_hooks to +block+. + # * :run_once - Given +block+ will run only once. + # + # source://activesupport//lib/active_support/lazy_load_hooks.rb#58 + def on_load(name, options = T.unsafe(nil), &block); end + + # Executes all blocks registered to +name+ via on_load, using +base+ as the + # evaluation context. + # + # ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base) + # + # In the case of the above example, it will execute all hooks registered + # for +:active_record+ within the class +ActiveRecord::Base+. + # + # source://activesupport//lib/active_support/lazy_load_hooks.rb#73 + def run_load_hooks(name, base = T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/lazy_load_hooks.rb#89 + def execute_hook(name, base, options, block); end + + # source://activesupport//lib/active_support/lazy_load_hooks.rb#81 + def with_execution_control(name, block, once); end + + class << self + # source://activesupport//lib/active_support/lazy_load_hooks.rb#42 + def extended(base); end + end +end + +# ActiveSupport::LogSubscriber is an object set to consume +# ActiveSupport::Notifications with the sole purpose of logging them. +# The log subscriber dispatches notifications to a registered object based +# on its given namespace. +# +# An example would be Active Record log subscriber responsible for logging +# queries: +# +# module ActiveRecord +# class LogSubscriber < ActiveSupport::LogSubscriber +# def sql(event) +# info "#{event.payload[:name]} (#{event.duration}) #{event.payload[:sql]}" +# end +# end +# end +# +# And it's finally registered as: +# +# ActiveRecord::LogSubscriber.attach_to :active_record +# +# Since we need to know all instance methods before attaching the log +# subscriber, the line above should be called after your +# ActiveRecord::LogSubscriber definition. +# +# A logger also needs to be set with ActiveRecord::LogSubscriber.logger=. +# This is assigned automatically in a Rails environment. +# +# After configured, whenever a "sql.active_record" notification is published, +# it will properly dispatch the event +# (ActiveSupport::Notifications::Event) to the sql method. +# +# Being an ActiveSupport::Notifications consumer, +# ActiveSupport::LogSubscriber exposes a simple interface to check if +# instrumented code raises an exception. It is common to log a different +# message in case of an error, and this can be achieved by extending +# the previous example: +# +# module ActiveRecord +# class LogSubscriber < ActiveSupport::LogSubscriber +# def sql(event) +# exception = event.payload[:exception] +# +# if exception +# exception_object = event.payload[:exception_object] +# +# error "[ERROR] #{event.payload[:name]}: #{exception.join(', ')} " \ +# "(#{exception_object.backtrace.first})" +# else +# # standard logger code +# end +# end +# end +# end +# +# Log subscriber also has some helpers to deal with logging and automatically +# flushes all logs when the request finishes +# (via action_dispatch.callback notification) in a Rails environment. +# +# source://activesupport//lib/active_support/log_subscriber.rb#66 +class ActiveSupport::LogSubscriber < ::ActiveSupport::Subscriber + # source://activesupport//lib/active_support/log_subscriber.rb#80 + def colorize_logging; end + + # source://activesupport//lib/active_support/log_subscriber.rb#80 + def colorize_logging=(val); end + + # source://activesupport//lib/active_support/log_subscriber.rb#129 + def debug(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#129 + def error(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#129 + def fatal(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#114 + def finish(name, id, payload); end + + # source://activesupport//lib/active_support/log_subscriber.rb#129 + def info(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#106 + def logger; end + + # source://activesupport//lib/active_support/log_subscriber.rb#120 + def publish_event(event); end + + # source://activesupport//lib/active_support/log_subscriber.rb#110 + def start(name, id, payload); end + + # source://activesupport//lib/active_support/log_subscriber.rb#129 + def unknown(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#129 + def warn(progname = T.unsafe(nil), &block); end + + private + + # Set color by using a symbol or one of the defined constants. If a third + # option is set to +true+, it also adds bold to the string. This is based + # on the Highline implementation and will automatically append CLEAR to the + # end of the returned String. + # + # source://activesupport//lib/active_support/log_subscriber.rb#139 + def color(text, color, bold = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/log_subscriber.rb#146 + def log_exception(name, e); end + + class << self + # source://activesupport//lib/active_support/log_subscriber.rb#80 + def colorize_logging; end + + # source://activesupport//lib/active_support/log_subscriber.rb#80 + def colorize_logging=(val); end + + # Flush all log_subscribers' logger. + # + # source://activesupport//lib/active_support/log_subscriber.rb#96 + def flush_all!; end + + # source://activesupport//lib/active_support/log_subscriber.rb#91 + def log_subscribers; end + + # source://activesupport//lib/active_support/log_subscriber.rb#83 + def logger; end + + # Sets the attribute logger + # + # @param value the value to set the attribute logger to. + # + # source://activesupport//lib/active_support/log_subscriber.rb#89 + def logger=(_arg0); end + + private + + # source://activesupport//lib/active_support/log_subscriber.rb#101 + def fetch_public_methods(subscriber, inherit_all); end + end +end + +# Colors +# +# source://activesupport//lib/active_support/log_subscriber.rb#71 +ActiveSupport::LogSubscriber::BLACK = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#75 +ActiveSupport::LogSubscriber::BLUE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#68 +ActiveSupport::LogSubscriber::BOLD = T.let(T.unsafe(nil), String) + +# Embed in a String to clear all previous ANSI sequences. +# +# source://activesupport//lib/active_support/log_subscriber.rb#67 +ActiveSupport::LogSubscriber::CLEAR = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#77 +ActiveSupport::LogSubscriber::CYAN = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#73 +ActiveSupport::LogSubscriber::GREEN = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#76 +ActiveSupport::LogSubscriber::MAGENTA = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#72 +ActiveSupport::LogSubscriber::RED = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#78 +ActiveSupport::LogSubscriber::WHITE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#74 +ActiveSupport::LogSubscriber::YELLOW = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/logger.rb#8 +class ActiveSupport::Logger < ::Logger + include ::ActiveSupport::LoggerSilence + include ::ActiveSupport::LoggerThreadSafeLevel + + # @return [Logger] a new instance of Logger + # + # source://activesupport//lib/active_support/logger.rb#80 + def initialize(*args, **kwargs); end + + # source://activesupport//lib/active_support/logger_silence.rb#12 + def silencer; end + + # source://activesupport//lib/active_support/logger_silence.rb#12 + def silencer=(val); end + + class << self + # Broadcasts logs to multiple loggers. + # + # source://activesupport//lib/active_support/logger.rb#23 + def broadcast(logger); end + + # Returns true if the logger destination matches one of the sources + # + # logger = Logger.new(STDOUT) + # ActiveSupport::Logger.logger_outputs_to?(logger, STDOUT) + # # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/logger.rb#16 + def logger_outputs_to?(logger, *sources); end + + # source://activesupport//lib/active_support/logger_silence.rb#12 + def silencer; end + + # source://activesupport//lib/active_support/logger_silence.rb#12 + def silencer=(val); end + end +end + +# Simple formatter which only displays the message. +# +# source://activesupport//lib/active_support/logger.rb#87 +class ActiveSupport::Logger::SimpleFormatter < ::Logger::Formatter + # This method is invoked when a log event occurs + # + # source://activesupport//lib/active_support/logger.rb#88 + def call(severity, timestamp, progname, msg); end +end + +# source://activesupport//lib/active_support/logger_silence.rb#8 +module ActiveSupport::LoggerSilence + extend ::ActiveSupport::Concern + include ::ActiveSupport::LoggerThreadSafeLevel + + # Silences the logger for the duration of the block. + # + # source://activesupport//lib/active_support/logger_silence.rb#17 + def silence(severity = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/logger_thread_safe_level.rb#9 +module ActiveSupport::LoggerThreadSafeLevel + extend ::ActiveSupport::Concern + + # Redefined to check severity against #level, and thus the thread-local level, rather than +@level+. + # FIXME: Remove when the minimum Ruby version supports overriding Logger#level. + # + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#50 + def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 + def debug?; end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 + def error?; end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 + def fatal?; end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 + def info?; end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#36 + def level; end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#20 + def local_level; end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#24 + def local_level=(level); end + + # Change the thread-local level for the duration of the given block. + # + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#41 + def log_at(level); end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 + def unknown?; end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#14 + def warn?; end +end + +# MessageEncryptor is a simple way to encrypt values which get stored +# somewhere you don't trust. +# +# The cipher text and initialization vector are base64 encoded and returned +# to you. +# +# This can be used in situations similar to the MessageVerifier, but +# where you don't want users to be able to determine the value of the payload. +# +# len = ActiveSupport::MessageEncryptor.key_len +# salt = SecureRandom.random_bytes(len) +# key = ActiveSupport::KeyGenerator.new('password').generate_key(salt, len) # => "\x89\xE0\x156\xAC..." +# crypt = ActiveSupport::MessageEncryptor.new(key) # => # +# encrypted_data = crypt.encrypt_and_sign('my secret data') # => "NlFBTTMwOUV5UlA1QlNEN2xkY2d6eThYWWh..." +# crypt.decrypt_and_verify(encrypted_data) # => "my secret data" +# +# The +decrypt_and_verify+ method will raise an +# ActiveSupport::MessageEncryptor::InvalidMessage exception if the data +# provided cannot be decrypted or verified. +# +# crypt.decrypt_and_verify('not encrypted data') # => ActiveSupport::MessageEncryptor::InvalidMessage +# +# === Confining messages to a specific purpose +# +# By default any message can be used throughout your app. But they can also be +# confined to a specific +:purpose+. +# +# token = crypt.encrypt_and_sign("this is the chair", purpose: :login) +# +# Then that same purpose must be passed when verifying to get the data back out: +# +# crypt.decrypt_and_verify(token, purpose: :login) # => "this is the chair" +# crypt.decrypt_and_verify(token, purpose: :shipping) # => nil +# crypt.decrypt_and_verify(token) # => nil +# +# Likewise, if a message has no purpose it won't be returned when verifying with +# a specific purpose. +# +# token = crypt.encrypt_and_sign("the conversation is lively") +# crypt.decrypt_and_verify(token, purpose: :scare_tactics) # => nil +# crypt.decrypt_and_verify(token) # => "the conversation is lively" +# +# === Making messages expire +# +# By default messages last forever and verifying one year from now will still +# return the original value. But messages can be set to expire at a given +# time with +:expires_in+ or +:expires_at+. +# +# crypt.encrypt_and_sign(parcel, expires_in: 1.month) +# crypt.encrypt_and_sign(doowad, expires_at: Time.now.end_of_year) +# +# Then the messages can be verified and returned up to the expire time. +# Thereafter, verifying returns +nil+. +# +# === Rotating keys +# +# MessageEncryptor also supports rotating out old configurations by falling +# back to a stack of encryptors. Call +rotate+ to build and add an encryptor +# so +decrypt_and_verify+ will also try the fallback. +# +# By default any rotated encryptors use the values of the primary +# encryptor unless specified otherwise. +# +# You'd give your encryptor the new defaults: +# +# crypt = ActiveSupport::MessageEncryptor.new(@secret, cipher: "aes-256-gcm") +# +# Then gradually rotate the old values out by adding them as fallbacks. Any message +# generated with the old values will then work until the rotation is removed. +# +# crypt.rotate old_secret # Fallback to an old secret instead of @secret. +# crypt.rotate cipher: "aes-256-cbc" # Fallback to an old cipher instead of aes-256-gcm. +# +# Though if both the secret and the cipher was changed at the same time, +# the above should be combined into: +# +# crypt.rotate old_secret, cipher: "aes-256-cbc" +# +# source://activesupport//lib/active_support/message_encryptor.rb#87 +class ActiveSupport::MessageEncryptor + include ::ActiveSupport::Messages::Rotator + include ::ActiveSupport::Messages::Rotator::Encryptor + + # Initialize a new MessageEncryptor. +secret+ must be at least as long as + # the cipher key size. For the default 'aes-256-gcm' cipher, this is 256 + # bits. If you are using a user-entered secret, you can generate a suitable + # key by using ActiveSupport::KeyGenerator or a similar key + # derivation function. + # + # First additional parameter is used as the signature key for MessageVerifier. + # This allows you to specify keys to encrypt and sign data. + # + # ActiveSupport::MessageEncryptor.new('secret', 'signature_secret') + # + # Options: + # * :cipher - Cipher to use. Can be any cipher returned by + # OpenSSL::Cipher.ciphers. Default is 'aes-256-gcm'. + # * :digest - String of digest to use for signing. Default is + # +SHA1+. Ignored when using an AEAD cipher like 'aes-256-gcm'. + # * :serializer - Object serializer to use. Default is +Marshal+. + # + # @return [MessageEncryptor] a new instance of MessageEncryptor + # + # source://activesupport//lib/active_support/messages/rotator.rb#6 + def initialize(*secrets, on_rotation: T.unsafe(nil), **options); end + + # Decrypt and verify a message. We need to verify the message in order to + # avoid padding attacks. Reference: https://www.limited-entropy.com/padding-oracle-attacks/. + # + # source://activesupport//lib/active_support/messages/rotator.rb#21 + def decrypt_and_verify(*args, on_rotation: T.unsafe(nil), **options); end + + # Encrypt and sign a message. We need to sign the message in order to avoid + # padding attacks. Reference: https://www.limited-entropy.com/padding-oracle-attacks/. + # + # source://activesupport//lib/active_support/message_encryptor.rb#153 + def encrypt_and_sign(value, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/message_encryptor.rb#186 + def _decrypt(encrypted_message, purpose); end + + # source://activesupport//lib/active_support/message_encryptor.rb#169 + def _encrypt(value, **metadata_options); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/message_encryptor.rb#218 + def aead_mode?; end + + # source://activesupport//lib/active_support/message_encryptor.rb#212 + def new_cipher; end + + # source://activesupport//lib/active_support/message_encryptor.rb#222 + def resolve_verifier; end + + # Returns the value of attribute verifier. + # + # source://activesupport//lib/active_support/message_encryptor.rb#216 + def verifier; end + + class << self + # source://activesupport//lib/active_support/message_encryptor.rb#93 + def default_cipher; end + + # Given a cipher, returns the key length of the cipher to help generate the key of desired size + # + # source://activesupport//lib/active_support/message_encryptor.rb#164 + def key_len(cipher = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/message_encryptor.rb#90 + def use_authenticated_message_encryption; end + + # source://activesupport//lib/active_support/message_encryptor.rb#90 + def use_authenticated_message_encryption=(val); end + end +end + +# source://activesupport//lib/active_support/message_encryptor.rb#122 +class ActiveSupport::MessageEncryptor::InvalidMessage < ::StandardError; end + +# source://activesupport//lib/active_support/message_encryptor.rb#102 +module ActiveSupport::MessageEncryptor::NullSerializer + class << self + # source://activesupport//lib/active_support/message_encryptor.rb#107 + def dump(value); end + + # source://activesupport//lib/active_support/message_encryptor.rb#103 + def load(value); end + end +end + +# source://activesupport//lib/active_support/message_encryptor.rb#112 +module ActiveSupport::MessageEncryptor::NullVerifier + class << self + # source://activesupport//lib/active_support/message_encryptor.rb#117 + def generate(value); end + + # source://activesupport//lib/active_support/message_encryptor.rb#113 + def verify(value); end + end +end + +# source://activesupport//lib/active_support/message_encryptor.rb#123 +ActiveSupport::MessageEncryptor::OpenSSLCipherError = OpenSSL::Cipher::CipherError + +# +MessageVerifier+ makes it easy to generate and verify messages which are +# signed to prevent tampering. +# +# This is useful for cases like remember-me tokens and auto-unsubscribe links +# where the session store isn't suitable or available. +# +# Remember Me: +# cookies[:remember_me] = @verifier.generate([@user.id, 2.weeks.from_now]) +# +# In the authentication filter: +# +# id, time = @verifier.verify(cookies[:remember_me]) +# if Time.now < time +# self.current_user = User.find(id) +# end +# +# By default it uses Marshal to serialize the message. If you want to use +# another serialization method, you can set the serializer in the options +# hash upon initialization: +# +# @verifier = ActiveSupport::MessageVerifier.new('s3Krit', serializer: YAML) +# +# +MessageVerifier+ creates HMAC signatures using SHA1 hash algorithm by default. +# If you want to use a different hash algorithm, you can change it by providing +# +:digest+ key as an option while initializing the verifier: +# +# @verifier = ActiveSupport::MessageVerifier.new('s3Krit', digest: 'SHA256') +# +# === Confining messages to a specific purpose +# +# By default any message can be used throughout your app. But they can also be +# confined to a specific +:purpose+. +# +# token = @verifier.generate("this is the chair", purpose: :login) +# +# Then that same purpose must be passed when verifying to get the data back out: +# +# @verifier.verified(token, purpose: :login) # => "this is the chair" +# @verifier.verified(token, purpose: :shipping) # => nil +# @verifier.verified(token) # => nil +# +# @verifier.verify(token, purpose: :login) # => "this is the chair" +# @verifier.verify(token, purpose: :shipping) # => ActiveSupport::MessageVerifier::InvalidSignature +# @verifier.verify(token) # => ActiveSupport::MessageVerifier::InvalidSignature +# +# Likewise, if a message has no purpose it won't be returned when verifying with +# a specific purpose. +# +# token = @verifier.generate("the conversation is lively") +# @verifier.verified(token, purpose: :scare_tactics) # => nil +# @verifier.verified(token) # => "the conversation is lively" +# +# @verifier.verify(token, purpose: :scare_tactics) # => ActiveSupport::MessageVerifier::InvalidSignature +# @verifier.verify(token) # => "the conversation is lively" +# +# === Making messages expire +# +# By default messages last forever and verifying one year from now will still +# return the original value. But messages can be set to expire at a given +# time with +:expires_in+ or +:expires_at+. +# +# @verifier.generate("parcel", expires_in: 1.month) +# @verifier.generate("doowad", expires_at: Time.now.end_of_year) +# +# Then the messages can be verified and returned up to the expire time. +# Thereafter, the +verified+ method returns +nil+ while +verify+ raises +# ActiveSupport::MessageVerifier::InvalidSignature. +# +# === Rotating keys +# +# MessageVerifier also supports rotating out old configurations by falling +# back to a stack of verifiers. Call +rotate+ to build and add a verifier so +# either +verified+ or +verify+ will also try verifying with the fallback. +# +# By default any rotated verifiers use the values of the primary +# verifier unless specified otherwise. +# +# You'd give your verifier the new defaults: +# +# verifier = ActiveSupport::MessageVerifier.new(@secret, digest: "SHA512", serializer: JSON) +# +# Then gradually rotate the old values out by adding them as fallbacks. Any message +# generated with the old values will then work until the rotation is removed. +# +# verifier.rotate old_secret # Fallback to an old secret instead of @secret. +# verifier.rotate digest: "SHA256" # Fallback to an old digest instead of SHA512. +# verifier.rotate serializer: Marshal # Fallback to an old serializer instead of JSON. +# +# Though the above would most likely be combined into one rotation: +# +# verifier.rotate old_secret, digest: "SHA256", serializer: Marshal +# +# source://activesupport//lib/active_support/message_verifier.rb#102 +class ActiveSupport::MessageVerifier + include ::ActiveSupport::Messages::Rotator + include ::ActiveSupport::Messages::Rotator::Verifier + + # @raise [ArgumentError] + # @return [MessageVerifier] a new instance of MessageVerifier + # + # source://activesupport//lib/active_support/messages/rotator.rb#6 + def initialize(*secrets, on_rotation: T.unsafe(nil), **options); end + + # Generates a signed message for the provided value. + # + # The message is signed with the +MessageVerifier+'s secret. + # Returns Base64-encoded message joined with the generated signature. + # + # verifier = ActiveSupport::MessageVerifier.new 's3Krit' + # verifier.generate 'a private message' # => "BAhJIhRwcml2YXRlLW1lc3NhZ2UGOgZFVA==--e2d724331ebdee96a10fb99b089508d1c72bd772" + # + # source://activesupport//lib/active_support/message_verifier.rb#188 + def generate(value, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end + + # Checks if a signed message could have been generated by signing an object + # with the +MessageVerifier+'s secret. + # + # verifier = ActiveSupport::MessageVerifier.new 's3Krit' + # signed_message = verifier.generate 'a private message' + # verifier.valid_message?(signed_message) # => true + # + # tampered_message = signed_message.chop # editing the message invalidates the signature + # verifier.valid_message?(tampered_message) # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/message_verifier.rb#126 + def valid_message?(signed_message); end + + # Decodes the signed message using the +MessageVerifier+'s secret. + # + # verifier = ActiveSupport::MessageVerifier.new 's3Krit' + # + # signed_message = verifier.generate 'a private message' + # verifier.verified(signed_message) # => 'a private message' + # + # Returns +nil+ if the message was not signed with the same secret. + # + # other_verifier = ActiveSupport::MessageVerifier.new 'd1ff3r3nt-s3Krit' + # other_verifier.verified(signed_message) # => nil + # + # Returns +nil+ if the message is not Base64-encoded. + # + # invalid_message = "f--46a0120593880c733a53b6dad75b42ddc1c8996d" + # verifier.verified(invalid_message) # => nil + # + # Raises any error raised while decoding the signed message. + # + # incompatible_message = "test--dad7b06c94abba8d46a15fafaef56c327665d5ff" + # verifier.verified(incompatible_message) # => TypeError: incompatible marshal file format + # + # source://activesupport//lib/active_support/messages/rotator.rb#36 + def verified(*args, on_rotation: T.unsafe(nil), **options); end + + # Decodes the signed message using the +MessageVerifier+'s secret. + # + # verifier = ActiveSupport::MessageVerifier.new 's3Krit' + # signed_message = verifier.generate 'a private message' + # + # verifier.verify(signed_message) # => 'a private message' + # + # Raises +InvalidSignature+ if the message was not signed with the same + # secret or was not Base64-encoded. + # + # other_verifier = ActiveSupport::MessageVerifier.new 'd1ff3r3nt-s3Krit' + # other_verifier.verify(signed_message) # => ActiveSupport::MessageVerifier::InvalidSignature + # + # source://activesupport//lib/active_support/message_verifier.rb#177 + def verify(*args, **options); end + + private + + # source://activesupport//lib/active_support/message_verifier.rb#198 + def decode(data); end + + # source://activesupport//lib/active_support/message_verifier.rb#206 + def digest_length_in_hex; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/message_verifier.rb#233 + def digest_matches_data?(digest, data); end + + # source://activesupport//lib/active_support/message_verifier.rb#194 + def encode(data); end + + # source://activesupport//lib/active_support/message_verifier.rb#202 + def generate_digest(data); end + + # source://activesupport//lib/active_support/message_verifier.rb#221 + def get_data_and_digest_from(signed_message); end + + # source://activesupport//lib/active_support/message_verifier.rb#214 + def separator_index_for(signed_message); end +end + +# source://activesupport//lib/active_support/message_verifier.rb#105 +class ActiveSupport::MessageVerifier::InvalidSignature < ::StandardError; end + +# source://activesupport//lib/active_support/message_verifier.rb#107 +ActiveSupport::MessageVerifier::SEPARATOR = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/message_verifier.rb#108 +ActiveSupport::MessageVerifier::SEPARATOR_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/messages/metadata.rb#6 +module ActiveSupport::Messages; end + +# source://activesupport//lib/active_support/messages/metadata.rb#7 +class ActiveSupport::Messages::Metadata + # @return [Metadata] a new instance of Metadata + # + # source://activesupport//lib/active_support/messages/metadata.rb#8 + def initialize(message, expires_at = T.unsafe(nil), purpose = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/messages/metadata.rb#13 + def as_json(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/messages/metadata.rb#58 + def verify(purpose); end + + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/metadata.rb#67 + def fresh?; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/metadata.rb#63 + def match?(purpose); end + + # source://activesupport//lib/active_support/messages/metadata.rb#71 + def parse_expires_at(expires_at); end + + class << self + # source://activesupport//lib/active_support/messages/metadata.rb#26 + def verify(message, purpose); end + + # source://activesupport//lib/active_support/messages/metadata.rb#18 + def wrap(message, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/messages/metadata.rb#53 + def decode(message); end + + # source://activesupport//lib/active_support/messages/metadata.rb#49 + def encode(message); end + + # source://activesupport//lib/active_support/messages/metadata.rb#39 + def extract_metadata(message); end + + # source://activesupport//lib/active_support/messages/metadata.rb#31 + def pick_expiry(expires_at, expires_in); end + end +end + +# source://activesupport//lib/active_support/messages/rotation_configuration.rb#5 +class ActiveSupport::Messages::RotationConfiguration + # @return [RotationConfiguration] a new instance of RotationConfiguration + # + # source://activesupport//lib/active_support/messages/rotation_configuration.rb#8 + def initialize; end + + # Returns the value of attribute encrypted. + # + # source://activesupport//lib/active_support/messages/rotation_configuration.rb#6 + def encrypted; end + + # source://activesupport//lib/active_support/messages/rotation_configuration.rb#12 + def rotate(kind, *args, **options); end + + # Returns the value of attribute signed. + # + # source://activesupport//lib/active_support/messages/rotation_configuration.rb#6 + def signed; end +end + +# source://activesupport//lib/active_support/messages/rotator.rb#5 +module ActiveSupport::Messages::Rotator + # source://activesupport//lib/active_support/messages/rotator.rb#6 + def initialize(*secrets, on_rotation: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/messages/rotator.rb#14 + def rotate(*secrets, **options); end + + private + + # source://activesupport//lib/active_support/messages/rotator.rb#47 + def run_rotations(on_rotation); end +end + +# source://activesupport//lib/active_support/messages/rotator.rb#18 +module ActiveSupport::Messages::Rotator::Encryptor + include ::ActiveSupport::Messages::Rotator + + # source://activesupport//lib/active_support/messages/rotator.rb#21 + def decrypt_and_verify(*args, on_rotation: T.unsafe(nil), **options); end + + private + + # source://activesupport//lib/active_support/messages/rotator.rb#28 + def build_rotation(secret = T.unsafe(nil), sign_secret = T.unsafe(nil), options); end +end + +# source://activesupport//lib/active_support/messages/rotator.rb#33 +module ActiveSupport::Messages::Rotator::Verifier + include ::ActiveSupport::Messages::Rotator + + # source://activesupport//lib/active_support/messages/rotator.rb#36 + def verified(*args, on_rotation: T.unsafe(nil), **options); end + + private + + # source://activesupport//lib/active_support/messages/rotator.rb#41 + def build_rotation(secret = T.unsafe(nil), options); end +end + +# source://activesupport//lib/active_support/multibyte.rb#4 +module ActiveSupport::Multibyte + class << self + # Returns the current proxy class. + # + # source://activesupport//lib/active_support/multibyte.rb#19 + def proxy_class; end + + # The proxy class returned when calling mb_chars. You can use this accessor + # to configure your own proxy class so you can support other encodings. See + # the ActiveSupport::Multibyte::Chars implementation for an example how to + # do this. + # + # ActiveSupport::Multibyte.proxy_class = CharsForUTF32 + # + # source://activesupport//lib/active_support/multibyte.rb#14 + def proxy_class=(klass); end + end +end + +# Chars enables you to work transparently with UTF-8 encoding in the Ruby +# String class without having extensive knowledge about the encoding. A +# Chars object accepts a string upon initialization and proxies String +# methods in an encoding safe manner. All the normal String methods are also +# implemented on the proxy. +# +# String methods are proxied through the Chars object, and can be accessed +# through the +mb_chars+ method. Methods which would normally return a +# String object now return a Chars object so methods can be chained. +# +# 'The Perfect String '.mb_chars.downcase.strip +# # => # +# +# Chars objects are perfectly interchangeable with String objects as long as +# no explicit class checks are made. If certain methods do explicitly check +# the class, call +to_s+ before you pass chars objects to them. +# +# bad.explicit_checking_method 'T'.mb_chars.downcase.to_s +# +# The default Chars implementation assumes that the encoding of the string +# is UTF-8, if you want to handle different encodings you can write your own +# multibyte string handler and configure it through +# ActiveSupport::Multibyte.proxy_class. +# +# class CharsForUTF32 +# def size +# @wrapped_string.size / 4 +# end +# +# def self.accepts?(string) +# string.length % 4 == 0 +# end +# end +# +# ActiveSupport::Multibyte.proxy_class = CharsForUTF32 +# +# source://activesupport//lib/active_support/multibyte/chars.rb#45 +class ActiveSupport::Multibyte::Chars + include ::Comparable + + # Creates a new Chars instance by wrapping _string_. + # + # @return [Chars] a new instance of Chars + # + # source://activesupport//lib/active_support/multibyte/chars.rb#54 + def initialize(string); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#51 + def <=>(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#51 + def =~(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#51 + def acts_like_string?(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#159 + def as_json(options = T.unsafe(nil)); end + + # Performs composition on all the characters. + # + # 'é'.length # => 1 + # 'é'.mb_chars.compose.to_s.length # => 1 + # + # source://activesupport//lib/active_support/multibyte/chars.rb#138 + def compose; end + + # Performs canonical decomposition on all the characters. + # + # 'é'.length # => 1 + # 'é'.mb_chars.decompose.to_s.length # => 2 + # + # source://activesupport//lib/active_support/multibyte/chars.rb#130 + def decompose; end + + # Returns the number of grapheme clusters in the string. + # + # 'क्षि'.mb_chars.length # => 4 + # 'क्षि'.mb_chars.grapheme_length # => 2 + # + # source://activesupport//lib/active_support/multibyte/chars.rb#146 + def grapheme_length; end + + # Limits the byte size of the string to a number of bytes without breaking + # characters. Usable when the storage for a string is limited for some + # reason. + # + # 'こんにちは'.mb_chars.limit(7).to_s # => "こん" + # + # source://activesupport//lib/active_support/multibyte/chars.rb#113 + def limit(limit); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#51 + def match?(*_arg0, **_arg1, &_arg2); end + + # Forward all undefined methods to the wrapped string. + # + # source://activesupport//lib/active_support/multibyte/chars.rb#60 + def method_missing(method, *args, &block); end + + # Reverses all characters in the string. + # + # 'Café'.mb_chars.reverse.to_s # => 'éfaC' + # + # source://activesupport//lib/active_support/multibyte/chars.rb#104 + def reverse; end + + # source://activesupport//lib/active_support/multibyte/chars.rb#164 + def reverse!(*args); end + + # Works like String#slice!, but returns an instance of + # Chars, or +nil+ if the string was not modified. The string will not be + # modified if the range given is out of bounds + # + # string = 'Welcome' + # string.mb_chars.slice!(3) # => # + # string # => 'Welome' + # string.mb_chars.slice!(0..3) # => # + # string # => 'me' + # + # source://activesupport//lib/active_support/multibyte/chars.rb#94 + def slice!(*args); end + + # Works just like String#split, with the exception that the items + # in the resulting list are Chars instances instead of String. This makes + # chaining methods easier. + # + # 'Café périferôl'.mb_chars.split(/é/).map { |part| part.upcase.to_s } # => ["CAF", " P", "RIFERÔL"] + # + # source://activesupport//lib/active_support/multibyte/chars.rb#81 + def split(*args); end + + # Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent + # resulting in a valid UTF-8 string. + # + # Passing +true+ will forcibly tidy all bytes, assuming that the string's + # encoding is entirely CP1252 or ISO-8859-1. + # + # source://activesupport//lib/active_support/multibyte/chars.rb#155 + def tidy_bytes(force = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#164 + def tidy_bytes!(*args); end + + # Capitalizes the first letter of every word, when possible. + # + # "ÉL QUE SE ENTERÓ".mb_chars.titleize.to_s # => "Él Que Se Enteró" + # "日本語".mb_chars.titleize.to_s # => "日本語" + # + # source://activesupport//lib/active_support/multibyte/chars.rb#121 + def titlecase; end + + # Capitalizes the first letter of every word, when possible. + # + # "ÉL QUE SE ENTERÓ".mb_chars.titleize.to_s # => "Él Que Se Enteró" + # "日本語".mb_chars.titleize.to_s # => "日本語" + # + # source://activesupport//lib/active_support/multibyte/chars.rb#121 + def titleize; end + + # Returns the value of attribute wrapped_string. + # + # source://activesupport//lib/active_support/multibyte/chars.rb#47 + def to_s; end + + # Returns the value of attribute wrapped_string. + # + # source://activesupport//lib/active_support/multibyte/chars.rb#47 + def to_str; end + + # Returns the value of attribute wrapped_string. + # + # source://activesupport//lib/active_support/multibyte/chars.rb#47 + def wrapped_string; end + + private + + # source://activesupport//lib/active_support/multibyte/chars.rb#171 + def chars(string); end + + # Returns +true+ if _obj_ responds to the given method. Private methods + # are included in the search only if the optional second parameter + # evaluates to +true+. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/multibyte/chars.rb#72 + def respond_to_missing?(method, include_private); end +end + +# source://activesupport//lib/active_support/multibyte/unicode.rb#5 +module ActiveSupport::Multibyte::Unicode + extend ::ActiveSupport::Multibyte::Unicode + + # Compose decomposed characters to the composed form. + # + # source://activesupport//lib/active_support/multibyte/unicode.rb#21 + def compose(codepoints); end + + # Decompose composed characters to the decomposed form. + # + # source://activesupport//lib/active_support/multibyte/unicode.rb#12 + def decompose(type, codepoints); end + + # Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent + # resulting in a valid UTF-8 string. + # + # Passing +true+ will forcibly tidy all bytes, assuming that the string's + # encoding is entirely CP1252 or ISO-8859-1. + # + # source://activesupport//lib/active_support/multibyte/unicode.rb#32 + def tidy_bytes(string, force = T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/multibyte/unicode.rb#65 + def recode_windows1252_chars(string); end +end + +# The Unicode version that is supported by the implementation +# +# source://activesupport//lib/active_support/multibyte/unicode.rb#9 +ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String) + +# = \Notifications +# +# ActiveSupport::Notifications provides an instrumentation API for +# Ruby. +# +# == Instrumenters +# +# To instrument an event you just need to do: +# +# ActiveSupport::Notifications.instrument('render', extra: :information) do +# render plain: 'Foo' +# end +# +# That first executes the block and then notifies all subscribers once done. +# +# In the example above +render+ is the name of the event, and the rest is called +# the _payload_. The payload is a mechanism that allows instrumenters to pass +# extra information to subscribers. Payloads consist of a hash whose contents +# are arbitrary and generally depend on the event. +# +# == Subscribers +# +# You can consume those events and the information they provide by registering +# a subscriber. +# +# ActiveSupport::Notifications.subscribe('render') do |name, start, finish, id, payload| +# name # => String, name of the event (such as 'render' from above) +# start # => Time, when the instrumented block started execution +# finish # => Time, when the instrumented block ended execution +# id # => String, unique ID for the instrumenter that fired the event +# payload # => Hash, the payload +# end +# +# Here, the +start+ and +finish+ values represent wall-clock time. If you are +# concerned about accuracy, you can register a monotonic subscriber. +# +# ActiveSupport::Notifications.monotonic_subscribe('render') do |name, start, finish, id, payload| +# name # => String, name of the event (such as 'render' from above) +# start # => Monotonic time, when the instrumented block started execution +# finish # => Monotonic time, when the instrumented block ended execution +# id # => String, unique ID for the instrumenter that fired the event +# payload # => Hash, the payload +# end +# +# The +start+ and +finish+ values above represent monotonic time. +# +# For instance, let's store all "render" events in an array: +# +# events = [] +# +# ActiveSupport::Notifications.subscribe('render') do |*args| +# events << ActiveSupport::Notifications::Event.new(*args) +# end +# +# That code returns right away, you are just subscribing to "render" events. +# The block is saved and will be called whenever someone instruments "render": +# +# ActiveSupport::Notifications.instrument('render', extra: :information) do +# render plain: 'Foo' +# end +# +# event = events.first +# event.name # => "render" +# event.duration # => 10 (in milliseconds) +# event.payload # => { extra: :information } +# +# The block in the subscribe call gets the name of the event, start +# timestamp, end timestamp, a string with a unique identifier for that event's instrumenter +# (something like "535801666f04d0298cd6"), and a hash with the payload, in +# that order. +# +# If an exception happens during that particular instrumentation the payload will +# have a key :exception with an array of two elements as value: a string with +# the name of the exception class, and the exception message. +# The :exception_object key of the payload will have the exception +# itself as the value: +# +# event.payload[:exception] # => ["ArgumentError", "Invalid value"] +# event.payload[:exception_object] # => # +# +# As the earlier example depicts, the class ActiveSupport::Notifications::Event +# is able to take the arguments as they come and provide an object-oriented +# interface to that data. +# +# It is also possible to pass an object which responds to call method +# as the second parameter to the subscribe method instead of a block: +# +# module ActionController +# class PageRequest +# def call(name, started, finished, unique_id, payload) +# Rails.logger.debug ['notification:', name, started, finished, unique_id, payload].join(' ') +# end +# end +# end +# +# ActiveSupport::Notifications.subscribe('process_action.action_controller', ActionController::PageRequest.new) +# +# resulting in the following output within the logs including a hash with the payload: +# +# notification: process_action.action_controller 2012-04-13 01:08:35 +0300 2012-04-13 01:08:35 +0300 af358ed7fab884532ec7 { +# controller: "Devise::SessionsController", +# action: "new", +# params: {"action"=>"new", "controller"=>"devise/sessions"}, +# format: :html, +# method: "GET", +# path: "/login/sign_in", +# status: 200, +# view_runtime: 279.3080806732178, +# db_runtime: 40.053 +# } +# +# You can also subscribe to all events whose name matches a certain regexp: +# +# ActiveSupport::Notifications.subscribe(/render/) do |*args| +# ... +# end +# +# and even pass no argument to subscribe, in which case you are subscribing +# to all events. +# +# == Temporary Subscriptions +# +# Sometimes you do not want to subscribe to an event for the entire life of +# the application. There are two ways to unsubscribe. +# +# WARNING: The instrumentation framework is designed for long-running subscribers, +# use this feature sparingly because it wipes some internal caches and that has +# a negative impact on performance. +# +# === Subscribe While a Block Runs +# +# You can subscribe to some event temporarily while some block runs. For +# example, in +# +# callback = lambda {|*args| ... } +# ActiveSupport::Notifications.subscribed(callback, "sql.active_record") do +# ... +# end +# +# the callback will be called for all "sql.active_record" events instrumented +# during the execution of the block. The callback is unsubscribed automatically +# after that. +# +# To record +started+ and +finished+ values with monotonic time, +# specify the optional :monotonic option to the +# subscribed method. The :monotonic option is set +# to +false+ by default. +# +# callback = lambda {|name, started, finished, unique_id, payload| ... } +# ActiveSupport::Notifications.subscribed(callback, "sql.active_record", monotonic: true) do +# ... +# end +# +# === Manual Unsubscription +# +# The +subscribe+ method returns a subscriber object: +# +# subscriber = ActiveSupport::Notifications.subscribe("render") do |*args| +# ... +# end +# +# To prevent that block from being called anymore, just unsubscribe passing +# that reference: +# +# ActiveSupport::Notifications.unsubscribe(subscriber) +# +# You can also unsubscribe by passing the name of the subscriber object. Note +# that this will unsubscribe all subscriptions with the given name: +# +# ActiveSupport::Notifications.unsubscribe("render") +# +# Subscribers using a regexp or other pattern-matching object will remain subscribed +# to all events that match their original pattern, unless those events match a string +# passed to +unsubscribe+: +# +# subscriber = ActiveSupport::Notifications.subscribe(/render/) { } +# ActiveSupport::Notifications.unsubscribe('render_template.action_view') +# subscriber.matches?('render_template.action_view') # => false +# subscriber.matches?('render_partial.action_view') # => true +# +# == Default Queue +# +# Notifications ships with a queue implementation that consumes and publishes events +# to all log subscribers. You can use any queue implementation you want. +# +# source://activesupport//lib/active_support/notifications/instrumenter.rb#6 +module ActiveSupport::Notifications + class << self + # source://activesupport//lib/active_support/notifications.rb#204 + def instrument(name, payload = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/notifications.rb#268 + def instrumenter; end + + # Performs the same functionality as #subscribe, but the +start+ and + # +finish+ block arguments are in monotonic time instead of wall-clock + # time. Monotonic time will not jump forward or backward (due to NTP or + # Daylights Savings). Use +monotonic_subscribe+ when accuracy of time + # duration is important. For example, computing elapsed time between + # two events. + # + # source://activesupport//lib/active_support/notifications.rb#253 + def monotonic_subscribe(pattern = T.unsafe(nil), callback = T.unsafe(nil), &block); end + + # Returns the value of attribute notifier. + # + # source://activesupport//lib/active_support/notifications.rb#194 + def notifier; end + + # Sets the attribute notifier + # + # @param value the value to set the attribute notifier to. + # + # source://activesupport//lib/active_support/notifications.rb#194 + def notifier=(_arg0); end + + # source://activesupport//lib/active_support/notifications.rb#196 + def publish(name, *args); end + + # source://activesupport//lib/active_support/notifications.rb#200 + def publish_event(event); end + + # Subscribe to a given event name with the passed +block+. + # + # You can subscribe to events by passing a String to match exact event + # names, or by passing a Regexp to match all events that match a pattern. + # + # ActiveSupport::Notifications.subscribe(/render/) do |*args| + # @event = ActiveSupport::Notifications::Event.new(*args) + # end + # + # The +block+ will receive five parameters with information about the event: + # + # ActiveSupport::Notifications.subscribe('render') do |name, start, finish, id, payload| + # name # => String, name of the event (such as 'render' from above) + # start # => Time, when the instrumented block started execution + # finish # => Time, when the instrumented block ended execution + # id # => String, unique ID for the instrumenter that fired the event + # payload # => Hash, the payload + # end + # + # If the block passed to the method only takes one parameter, + # it will yield an event object to the block: + # + # ActiveSupport::Notifications.subscribe(/render/) do |event| + # @event = event + # end + # + # Raises an error if invalid event name type is passed: + # + # ActiveSupport::Notifications.subscribe(:render) {|*args| ...} + # #=> ArgumentError (pattern must be specified as a String, Regexp or empty) + # + # source://activesupport//lib/active_support/notifications.rb#243 + def subscribe(pattern = T.unsafe(nil), callback = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/notifications.rb#257 + def subscribed(callback, pattern = T.unsafe(nil), monotonic: T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/notifications.rb#264 + def unsubscribe(subscriber_or_name); end + + private + + # source://activesupport//lib/active_support/notifications.rb#273 + def registry; end + end +end + +# source://activesupport//lib/active_support/notifications/instrumenter.rb#58 +class ActiveSupport::Notifications::Event + # @return [Event] a new instance of Event + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#62 + def initialize(name, start, ending, transaction_id, payload); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#136 + def <<(event); end + + # Returns the number of allocations made since the call to +start!+ and + # the call to +finish!+ + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#116 + def allocations; end + + # Returns the value of attribute children. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#59 + def children; end + + # Returns the CPU time (in milliseconds) passed since the call to + # +start!+ and the call to +finish!+ + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#104 + def cpu_time; end + + # Returns the difference in milliseconds between when the execution of the + # event started and when it ended. + # + # ActiveSupport::Notifications.subscribe('wait') do |*args| + # @event = ActiveSupport::Notifications::Event.new(*args) + # end + # + # ActiveSupport::Notifications.instrument('wait') do + # sleep 1 + # end + # + # @event.duration # => 1000.138 + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#132 + def duration; end + + # Returns the value of attribute end. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#59 + def end; end + + # Record information at the time this event finishes + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#96 + def finish!; end + + # Returns the idle time time (in milliseconds) passed since the call to + # +start!+ and the call to +finish!+ + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#110 + def idle_time; end + + # Returns the value of attribute name. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#59 + def name; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#140 + def parent_of?(event); end + + # Returns the value of attribute payload. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#60 + def payload; end + + # Sets the attribute payload + # + # @param value the value to set the attribute payload to. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#60 + def payload=(_arg0); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#75 + def record; end + + # Record information at the time this event starts + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#89 + def start!; end + + # Returns the value of attribute time. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#59 + def time; end + + # Returns the value of attribute transaction_id. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#59 + def transaction_id; end + + private + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#145 + def now; end + + # Likely on JRuby, TruffleRuby + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#162 + def now_allocations; end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#152 + def now_cpu; end +end + +# This is a default queue implementation that ships with Notifications. +# It just pushes events to all registered log subscribers. +# +# This class is thread safe. All methods are reentrant. +# +# source://activesupport//lib/active_support/notifications/fanout.rb#24 +class ActiveSupport::Notifications::Fanout + include ::Mutex_m + + # @return [Fanout] a new instance of Fanout + # + # source://activesupport//lib/active_support/notifications/fanout.rb#27 + def initialize; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#75 + def finish(name, id, payload, listeners = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#87 + def iterate_guarding_exceptions(listeners); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#108 + def listeners_for(name); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/notifications/fanout.rb#117 + def listening?(name); end + + # source://mutex_m/0.1.1/mutex_m.rb#93 + def lock; end + + # source://mutex_m/0.1.1/mutex_m.rb#83 + def locked?; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#79 + def publish(name, *args); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#83 + def publish_event(event); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#71 + def start(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#34 + def subscribe(pattern = T.unsafe(nil), callable = T.unsafe(nil), monotonic: T.unsafe(nil), &block); end + + # source://mutex_m/0.1.1/mutex_m.rb#78 + def synchronize(&block); end + + # source://mutex_m/0.1.1/mutex_m.rb#88 + def try_lock; end + + # source://mutex_m/0.1.1/mutex_m.rb#98 + def unlock; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#51 + def unsubscribe(subscriber_or_name); end + + # This is a sync queue, so there is no waiting. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#122 + def wait; end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#125 +module ActiveSupport::Notifications::Fanout::Subscribers + class << self + # source://activesupport//lib/active_support/notifications/fanout.rb#126 + def new(pattern, listener, monotonic); end + end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#257 +class ActiveSupport::Notifications::Fanout::Subscribers::EventObject < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented + # source://activesupport//lib/active_support/notifications/fanout.rb#265 + def finish(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#273 + def publish_event(event); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#258 + def start(name, id, payload); end + + private + + # source://activesupport//lib/active_support/notifications/fanout.rb#278 + def build_event(name, id, payload); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#182 +class ActiveSupport::Notifications::Fanout::Subscribers::Evented + # @return [Evented] a new instance of Evented + # + # source://activesupport//lib/active_support/notifications/fanout.rb#185 + def initialize(pattern, delegate); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#210 + def finish(name, id, payload); end + + # Returns the value of attribute pattern. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#183 + def pattern; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#192 + def publish(name, *args); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#198 + def publish_event(event); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#206 + def start(name, id, payload); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/notifications/fanout.rb#214 + def subscribed_to?(name); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#218 + def unsubscribe!(name); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#145 +class ActiveSupport::Notifications::Fanout::Subscribers::Matcher + # @return [Matcher] a new instance of Matcher + # + # source://activesupport//lib/active_support/notifications/fanout.rb#158 + def initialize(pattern); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#167 + def ===(name); end + + # Returns the value of attribute exclusions. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#146 + def exclusions; end + + # Returns the value of attribute pattern. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#146 + def pattern; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#163 + def unsubscribe!(name); end + + class << self + # source://activesupport//lib/active_support/notifications/fanout.rb#148 + def wrap(pattern); end + end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#171 +class ActiveSupport::Notifications::Fanout::Subscribers::Matcher::AllMessages + # source://activesupport//lib/active_support/notifications/fanout.rb#172 + def ===(name); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#176 + def unsubscribe!(*_arg0); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#240 +class ActiveSupport::Notifications::Fanout::Subscribers::MonotonicTimed < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented + # source://activesupport//lib/active_support/notifications/fanout.rb#250 + def finish(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#241 + def publish(name, *args); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#245 + def start(name, id, payload); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#223 +class ActiveSupport::Notifications::Fanout::Subscribers::Timed < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented + # source://activesupport//lib/active_support/notifications/fanout.rb#233 + def finish(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#224 + def publish(name, *args); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#228 + def start(name, id, payload); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#10 +class ActiveSupport::Notifications::InstrumentationSubscriberError < ::RuntimeError + # @return [InstrumentationSubscriberError] a new instance of InstrumentationSubscriberError + # + # source://activesupport//lib/active_support/notifications/fanout.rb#13 + def initialize(exceptions); end + + # Returns the value of attribute exceptions. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#11 + def exceptions; end +end + +# Instrumenters are stored in a thread local. +# +# source://activesupport//lib/active_support/notifications/instrumenter.rb#8 +class ActiveSupport::Notifications::Instrumenter + # @return [Instrumenter] a new instance of Instrumenter + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#11 + def initialize(notifier); end + + # Send a finish notification with +name+ and +payload+. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#44 + def finish(name, payload); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#48 + def finish_with_state(listeners_state, name, payload); end + + # Returns the value of attribute id. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#9 + def id; end + + # Given a block, instrument it by measuring the time taken to execute + # and publish it. Without a block, simply send a message via the + # notifier. Notice that events get sent even if an error occurs in the + # passed-in block. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#20 + def instrument(name, payload = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#34 + def new_event(name, payload = T.unsafe(nil)); end + + # Send a start notification with +name+ and +payload+. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#39 + def start(name, payload); end + + private + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#53 + def unique_id; end +end + +# source://activesupport//lib/active_support/number_helper.rb#4 +module ActiveSupport::NumberHelper + extend ::ActiveSupport::Autoload + extend ::ActiveSupport::NumberHelper + + # Formats a +number+ into a currency string (e.g., $13.65). You + # can customize the format in the +options+ hash. + # + # The currency unit and number formatting of the current locale will be used + # unless otherwise specified in the provided options. No currency conversion + # is performed. If the user is given a way to change their locale, they will + # also be able to change the relative value of the currency displayed with + # this helper. If your application will ever support multiple locales, you + # may want to specify a constant :locale option or consider + # using a library capable of currency conversion. + # + # ==== Options + # + # * :locale - Sets the locale to be used for formatting + # (defaults to current locale). + # * :precision - Sets the level of precision (defaults + # to 2). + # * :round_mode - Determine how rounding is performed + # (defaults to :default. See BigDecimal::mode) + # * :unit - Sets the denomination of the currency + # (defaults to "$"). + # * :separator - Sets the separator between the units + # (defaults to "."). + # * :delimiter - Sets the thousands delimiter (defaults + # to ","). + # * :format - Sets the format for non-negative numbers + # (defaults to "%u%n"). Fields are %u for the + # currency, and %n for the number. + # * :negative_format - Sets the format for negative + # numbers (defaults to prepending a hyphen to the formatted + # number given by :format). Accepts the same fields + # than :format, except %n is here the + # absolute value of the number. + # * :strip_insignificant_zeros - If +true+ removes + # insignificant zeros after the decimal separator (defaults to + # +false+). + # + # ==== Examples + # + # number_to_currency(1234567890.50) # => "$1,234,567,890.50" + # number_to_currency(1234567890.506) # => "$1,234,567,890.51" + # number_to_currency(1234567890.506, precision: 3) # => "$1,234,567,890.506" + # number_to_currency(1234567890.506, locale: :fr) # => "1 234 567 890,51 €" + # number_to_currency('123a456') # => "$123a456" + # + # number_to_currency(-0.456789, precision: 0) + # # => "$0" + # number_to_currency(-1234567890.50, negative_format: '(%u%n)') + # # => "($1,234,567,890.50)" + # number_to_currency(1234567890.50, unit: '£', separator: ',', delimiter: '') + # # => "£1234567890,50" + # number_to_currency(1234567890.50, unit: '£', separator: ',', delimiter: '', format: '%n %u') + # # => "1234567890,50 £" + # number_to_currency(1234567890.50, strip_insignificant_zeros: true) + # # => "$1,234,567,890.5" + # number_to_currency(1234567890.50, precision: 0, round_mode: :up) + # # => "$1,234,567,891" + # + # source://activesupport//lib/active_support/number_helper.rb#114 + def number_to_currency(number, options = T.unsafe(nil)); end + + # Formats a +number+ with grouped thousands using +delimiter+ + # (e.g., 12,324). You can customize the format in the +options+ + # hash. + # + # ==== Options + # + # * :locale - Sets the locale to be used for formatting + # (defaults to current locale). + # * :delimiter - Sets the thousands delimiter (defaults + # to ","). + # * :separator - Sets the separator between the + # fractional and integer digits (defaults to "."). + # * :delimiter_pattern - Sets a custom regular expression used for + # deriving the placement of delimiter. Helpful when using currency formats + # like INR. + # + # ==== Examples + # + # number_to_delimited(12345678) # => "12,345,678" + # number_to_delimited('123456') # => "123,456" + # number_to_delimited(12345678.05) # => "12,345,678.05" + # number_to_delimited(12345678, delimiter: '.') # => "12.345.678" + # number_to_delimited(12345678, delimiter: ',') # => "12,345,678" + # number_to_delimited(12345678.05, separator: ' ') # => "12,345,678 05" + # number_to_delimited(12345678.05, locale: :fr) # => "12 345 678,05" + # number_to_delimited('112a') # => "112a" + # number_to_delimited(98765432.98, delimiter: ' ', separator: ',') + # # => "98 765 432,98" + # number_to_delimited("123456.78", + # delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/) + # # => "1,23,456.78" + # + # source://activesupport//lib/active_support/number_helper.rb#189 + def number_to_delimited(number, options = T.unsafe(nil)); end + + # Pretty prints (formats and approximates) a number in a way it + # is more readable by humans (e.g.: 1200000000 becomes "1.2 + # Billion"). This is useful for numbers that can get very large + # (and too hard to read). + # + # See number_to_human_size if you want to print a file + # size. + # + # You can also define your own unit-quantifier names if you want + # to use other decimal units (e.g.: 1500 becomes "1.5 + # kilometers", 0.150 becomes "150 milliliters", etc). You may + # define a wide range of unit quantifiers, even fractional ones + # (centi, deci, mili, etc). + # + # ==== Options + # + # * :locale - Sets the locale to be used for formatting + # (defaults to current locale). + # * :precision - Sets the precision of the number + # (defaults to 3). + # * :round_mode - Determine how rounding is performed + # (defaults to :default. See BigDecimal::mode) + # * :significant - If +true+, precision will be the number + # of significant_digits. If +false+, the number of fractional + # digits (defaults to +true+) + # * :separator - Sets the separator between the + # fractional and integer digits (defaults to "."). + # * :delimiter - Sets the thousands delimiter (defaults + # to ""). + # * :strip_insignificant_zeros - If +true+ removes + # insignificant zeros after the decimal separator (defaults to + # +true+) + # * :units - A Hash of unit quantifier names. Or a + # string containing an i18n scope where to find this hash. It + # might have the following keys: + # * *integers*: :unit, :ten, + # :hundred, :thousand, :million, + # :billion, :trillion, + # :quadrillion + # * *fractionals*: :deci, :centi, + # :mili, :micro, :nano, + # :pico, :femto + # * :format - Sets the format of the output string + # (defaults to "%n %u"). The field types are: + # * %u - The quantifier (ex.: 'thousand') + # * %n - The number + # + # ==== Examples + # + # number_to_human(123) # => "123" + # number_to_human(1234) # => "1.23 Thousand" + # number_to_human(12345) # => "12.3 Thousand" + # number_to_human(1234567) # => "1.23 Million" + # number_to_human(1234567890) # => "1.23 Billion" + # number_to_human(1234567890123) # => "1.23 Trillion" + # number_to_human(1234567890123456) # => "1.23 Quadrillion" + # number_to_human(1234567890123456789) # => "1230 Quadrillion" + # number_to_human(489939, precision: 2) # => "490 Thousand" + # number_to_human(489939, precision: 4) # => "489.9 Thousand" + # number_to_human(489939, precision: 2 + # , round_mode: :down) # => "480 Thousand" + # number_to_human(1234567, precision: 4, + # significant: false) # => "1.2346 Million" + # number_to_human(1234567, precision: 1, + # separator: ',', + # significant: false) # => "1,2 Million" + # + # number_to_human(500000000, precision: 5) # => "500 Million" + # number_to_human(12345012345, significant: false) # => "12.345 Billion" + # + # Non-significant zeros after the decimal separator are stripped + # out by default (set :strip_insignificant_zeros to + # +false+ to change that): + # + # number_to_human(12.00001) # => "12" + # number_to_human(12.00001, strip_insignificant_zeros: false) # => "12.0" + # + # ==== Custom Unit Quantifiers + # + # You can also use your own custom unit quantifiers: + # number_to_human(500000, units: { unit: 'ml', thousand: 'lt' }) # => "500 lt" + # + # If in your I18n locale you have: + # + # distance: + # centi: + # one: "centimeter" + # other: "centimeters" + # unit: + # one: "meter" + # other: "meters" + # thousand: + # one: "kilometer" + # other: "kilometers" + # billion: "gazillion-distance" + # + # Then you could do: + # + # number_to_human(543934, units: :distance) # => "544 kilometers" + # number_to_human(54393498, units: :distance) # => "54400 kilometers" + # number_to_human(54393498000, units: :distance) # => "54.4 gazillion-distance" + # number_to_human(343, units: :distance, precision: 1) # => "300 meters" + # number_to_human(1, units: :distance) # => "1 meter" + # number_to_human(0.34, units: :distance) # => "34 centimeters" + # + # source://activesupport//lib/active_support/number_helper.rb#391 + def number_to_human(number, options = T.unsafe(nil)); end + + # Formats the bytes in +number+ into a more understandable + # representation (e.g., giving it 1500 yields 1.46 KB). This + # method is useful for reporting file sizes to users. You can + # customize the format in the +options+ hash. + # + # See number_to_human if you want to pretty-print a + # generic number. + # + # ==== Options + # + # * :locale - Sets the locale to be used for formatting + # (defaults to current locale). + # * :precision - Sets the precision of the number + # (defaults to 3). + # * :round_mode - Determine how rounding is performed + # (defaults to :default. See BigDecimal::mode) + # * :significant - If +true+, precision will be the number + # of significant_digits. If +false+, the number of fractional + # digits (defaults to +true+) + # * :separator - Sets the separator between the + # fractional and integer digits (defaults to "."). + # * :delimiter - Sets the thousands delimiter (defaults + # to ""). + # * :strip_insignificant_zeros - If +true+ removes + # insignificant zeros after the decimal separator (defaults to + # +true+) + # + # ==== Examples + # + # number_to_human_size(123) # => "123 Bytes" + # number_to_human_size(1234) # => "1.21 KB" + # number_to_human_size(12345) # => "12.1 KB" + # number_to_human_size(1234567) # => "1.18 MB" + # number_to_human_size(1234567890) # => "1.15 GB" + # number_to_human_size(1234567890123) # => "1.12 TB" + # number_to_human_size(1234567890123456) # => "1.1 PB" + # number_to_human_size(1234567890123456789) # => "1.07 EB" + # number_to_human_size(1234567, precision: 2) # => "1.2 MB" + # number_to_human_size(483989, precision: 2) # => "470 KB" + # number_to_human_size(483989, precision: 2, round_mode: :up) # => "480 KB" + # number_to_human_size(1234567, precision: 2, separator: ',') # => "1,2 MB" + # number_to_human_size(1234567890123, precision: 5) # => "1.1228 TB" + # number_to_human_size(524288000, precision: 5) # => "500 MB" + # + # source://activesupport//lib/active_support/number_helper.rb#283 + def number_to_human_size(number, options = T.unsafe(nil)); end + + # Formats a +number+ as a percentage string (e.g., 65%). You can + # customize the format in the +options+ hash. + # + # ==== Options + # + # * :locale - Sets the locale to be used for formatting + # (defaults to current locale). + # * :precision - Sets the precision of the number + # (defaults to 3). Keeps the number's precision if +nil+. + # * :round_mode - Determine how rounding is performed + # (defaults to :default. See BigDecimal::mode) + # * :significant - If +true+, precision will be the number + # of significant_digits. If +false+, the number of fractional + # digits (defaults to +false+). + # * :separator - Sets the separator between the + # fractional and integer digits (defaults to "."). + # * :delimiter - Sets the thousands delimiter (defaults + # to ""). + # * :strip_insignificant_zeros - If +true+ removes + # insignificant zeros after the decimal separator (defaults to + # +false+). + # * :format - Specifies the format of the percentage + # string The number field is %n (defaults to "%n%"). + # + # ==== Examples + # + # number_to_percentage(100) # => "100.000%" + # number_to_percentage('98') # => "98.000%" + # number_to_percentage(100, precision: 0) # => "100%" + # number_to_percentage(1000, delimiter: '.', separator: ',') # => "1.000,000%" + # number_to_percentage(302.24398923423, precision: 5) # => "302.24399%" + # number_to_percentage(1000, locale: :fr) # => "1000,000%" + # number_to_percentage(1000, precision: nil) # => "1000%" + # number_to_percentage('98a') # => "98a%" + # number_to_percentage(100, format: '%n %') # => "100.000 %" + # number_to_percentage(302.24398923423, precision: 5, round_mode: :down) # => "302.24398%" + # + # source://activesupport//lib/active_support/number_helper.rb#154 + def number_to_percentage(number, options = T.unsafe(nil)); end + + # Formats a +number+ into a phone number (US by default e.g., (555) + # 123-9876). You can customize the format in the +options+ hash. + # + # ==== Options + # + # * :area_code - Adds parentheses around the area code. + # * :delimiter - Specifies the delimiter to use + # (defaults to "-"). + # * :extension - Specifies an extension to add to the + # end of the generated number. + # * :country_code - Sets the country code for the phone + # number. + # * :pattern - Specifies how the number is divided into three + # groups with the custom regexp to override the default format. + # ==== Examples + # + # number_to_phone(5551234) # => "555-1234" + # number_to_phone('5551234') # => "555-1234" + # number_to_phone(1235551234) # => "123-555-1234" + # number_to_phone(1235551234, area_code: true) # => "(123) 555-1234" + # number_to_phone(1235551234, delimiter: ' ') # => "123 555 1234" + # number_to_phone(1235551234, area_code: true, extension: 555) # => "(123) 555-1234 x 555" + # number_to_phone(1235551234, country_code: 1) # => "+1-123-555-1234" + # number_to_phone('123a456') # => "123a456" + # + # number_to_phone(1235551234, country_code: 1, extension: 1343, delimiter: '.') + # # => "+1.123.555.1234 x 1343" + # + # number_to_phone(75561234567, pattern: /(\d{1,4})(\d{4})(\d{4})$/, area_code: true) + # # => "(755) 6123-4567" + # number_to_phone(13312345678, pattern: /(\d{3})(\d{4})(\d{4})$/) + # # => "133-1234-5678" + # + # source://activesupport//lib/active_support/number_helper.rb#53 + def number_to_phone(number, options = T.unsafe(nil)); end + + # Formats a +number+ with the specified level of + # :precision (e.g., 112.32 has a precision of 2 if + # +:significant+ is +false+, and 5 if +:significant+ is +true+). + # You can customize the format in the +options+ hash. + # + # ==== Options + # + # * :locale - Sets the locale to be used for formatting + # (defaults to current locale). + # * :precision - Sets the precision of the number + # (defaults to 3). Keeps the number's precision if +nil+. + # * :round_mode - Determine how rounding is performed + # (defaults to :default. See BigDecimal::mode) + # * :significant - If +true+, precision will be the number + # of significant_digits. If +false+, the number of fractional + # digits (defaults to +false+). + # * :separator - Sets the separator between the + # fractional and integer digits (defaults to "."). + # * :delimiter - Sets the thousands delimiter (defaults + # to ""). + # * :strip_insignificant_zeros - If +true+ removes + # insignificant zeros after the decimal separator (defaults to + # +false+). + # + # ==== Examples + # + # number_to_rounded(111.2345) # => "111.235" + # number_to_rounded(111.2345, precision: 2) # => "111.23" + # number_to_rounded(13, precision: 5) # => "13.00000" + # number_to_rounded(389.32314, precision: 0) # => "389" + # number_to_rounded(111.2345, significant: true) # => "111" + # number_to_rounded(111.2345, precision: 1, significant: true) # => "100" + # number_to_rounded(13, precision: 5, significant: true) # => "13.000" + # number_to_rounded(13, precision: nil) # => "13" + # number_to_rounded(389.32314, precision: 0, round_mode: :up) # => "390" + # number_to_rounded(111.234, locale: :fr) # => "111,234" + # + # number_to_rounded(13, precision: 5, significant: true, strip_insignificant_zeros: true) + # # => "13" + # + # number_to_rounded(389.32314, precision: 4, significant: true) # => "389.3" + # number_to_rounded(1111.2345, precision: 2, separator: ',', delimiter: '.') + # # => "1.111,23" + # + # source://activesupport//lib/active_support/number_helper.rb#236 + def number_to_rounded(number, options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/number_helper/number_converter.rb#11 +class ActiveSupport::NumberHelper::NumberConverter + # @return [NumberConverter] a new instance of NumberConverter + # + # source://activesupport//lib/active_support/number_helper/number_converter.rb#123 + def initialize(number, options); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#128 + def execute; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + def namespace; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + def namespace=(_arg0); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + def namespace?; end + + # Returns the value of attribute number. + # + # source://activesupport//lib/active_support/number_helper/number_converter.rb#18 + def number; end + + # Returns the value of attribute opts. + # + # source://activesupport//lib/active_support/number_helper/number_converter.rb#18 + def opts; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + def validate_float; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + def validate_float=(_arg0); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + def validate_float?; end + + private + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#147 + def default_format_options; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#172 + def default_value(key); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#143 + def format_options; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#153 + def i18n_format_options; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#139 + def options; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#168 + def translate_in_locale(key, **i18n_options); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#164 + def translate_number_value_with_default(key, **i18n_options); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/number_helper/number_converter.rb#176 + def valid_float?; end + + class << self + # source://activesupport//lib/active_support/number_helper/number_converter.rb#119 + def convert(number, options); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + def namespace; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + def namespace=(value); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + def namespace?; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + def validate_float; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + def validate_float=(value); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + def validate_float?; end + end +end + +# source://activesupport//lib/active_support/number_helper/number_converter.rb#20 +ActiveSupport::NumberHelper::NumberConverter::DEFAULTS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#7 +class ActiveSupport::NumberHelper::NumberToCurrencyConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#10 + def convert; end + + private + + # source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#38 + def i18n_opts; end + + # source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#29 + def options; end + + class << self + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + def namespace; end + end +end + +# source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#7 +class ActiveSupport::NumberHelper::NumberToDelimitedConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#12 + def convert; end + + private + + # source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#25 + def delimiter_pattern; end + + # source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#17 + def parts; end + + class << self + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + def validate_float; end + end +end + +# source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#10 +ActiveSupport::NumberHelper::NumberToDelimitedConverter::DEFAULT_DELIMITER_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#7 +class ActiveSupport::NumberHelper::NumberToHumanConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#15 + def convert; end + + private + + # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#50 + def calculate_exponent(units); end + + # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#38 + def determine_unit(units, exponent); end + + # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#34 + def format; end + + # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#55 + def unit_exponents(units); end + + class << self + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + def namespace; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + def validate_float; end + end +end + +# source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#8 +ActiveSupport::NumberHelper::NumberToHumanConverter::DECIMAL_UNITS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#10 +ActiveSupport::NumberHelper::NumberToHumanConverter::INVERTED_DECIMAL_UNITS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#7 +class ActiveSupport::NumberHelper::NumberToHumanSizeConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#13 + def convert; end + + private + + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#55 + def base; end + + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#31 + def conversion_format; end + + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#44 + def exponent; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#51 + def smaller_than_base?; end + + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#39 + def storage_unit_key; end + + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#35 + def unit; end + + class << self + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + def namespace; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + def validate_float; end + end +end + +# source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#8 +ActiveSupport::NumberHelper::NumberToHumanSizeConverter::STORAGE_UNITS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/number_helper/number_to_percentage_converter.rb#7 +class ActiveSupport::NumberHelper::NumberToPercentageConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_percentage_converter.rb#10 + def convert; end + + class << self + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + def namespace; end + end +end + +# source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#7 +class ActiveSupport::NumberHelper::NumberToPhoneConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#8 + def convert; end + + private + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#15 + def convert_to_phone_number(number); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#23 + def convert_with_area_code(number); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#30 + def convert_without_area_code(number); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#46 + def country_code(code); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#42 + def delimiter; end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#50 + def phone_ext(ext); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#54 + def regexp_pattern(default_pattern); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#38 + def start_with_delimiter?(number); end +end + +# source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#7 +class ActiveSupport::NumberHelper::NumberToRoundedConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#11 + def convert; end + + private + + # source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#49 + def format_number(number); end + + # source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#45 + def strip_insignificant_zeros; end + + class << self + # source://activesupport//lib/active_support/number_helper/number_converter.rb#13 + def namespace; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#16 + def validate_float; end + end +end + +# source://activesupport//lib/active_support/number_helper/rounding_helper.rb#5 +class ActiveSupport::NumberHelper::RoundingHelper + # @return [RoundingHelper] a new instance of RoundingHelper + # + # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#8 + def initialize(options); end + + # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#20 + def digit_count(number); end + + # Returns the value of attribute options. + # + # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#6 + def options; end + + # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#12 + def round(number); end + + private + + # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#37 + def absolute_precision(number); end + + # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#26 + def convert_to_decimal(number); end +end + +# source://activesupport//lib/active_support/option_merger.rb#6 +class ActiveSupport::OptionMerger + # @return [OptionMerger] a new instance of OptionMerger + # + # source://activesupport//lib/active_support/option_merger.rb#11 + def initialize(context, options); end + + private + + # source://activesupport//lib/active_support/option_merger.rb#16 + def method_missing(method, *arguments, &block); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/option_merger.rb#34 + def respond_to_missing?(*arguments); end +end + +# DEPRECATED: ActiveSupport::OrderedHash implements a hash that preserves +# insertion order. +# +# oh = ActiveSupport::OrderedHash.new +# oh[:a] = 1 +# oh[:b] = 2 +# oh.keys # => [:a, :b], this order is guaranteed +# +# Also, maps the +omap+ feature for YAML files +# (See https://yaml.org/type/omap.html) to support ordered items +# when loading from yaml. +# +# ActiveSupport::OrderedHash is namespaced to prevent conflicts +# with other implementations. +# +# source://activesupport//lib/active_support/ordered_hash.rb#24 +class ActiveSupport::OrderedHash < ::Hash + # source://activesupport//lib/active_support/ordered_hash.rb#29 + def encode_with(coder); end + + # Returns true to make sure that this hash is extractable via Array#extract_options! + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/ordered_hash.rb#46 + def extractable_options?; end + + # source://activesupport//lib/active_support/ordered_hash.rb#41 + def nested_under_indifferent_access; end + + # source://activesupport//lib/active_support/ordered_hash.rb#37 + def reject(*args, &block); end + + # source://activesupport//lib/active_support/ordered_hash.rb#33 + def select(*args, &block); end + + # source://activesupport//lib/active_support/ordered_hash.rb#25 + def to_yaml_type; end +end + +# +OrderedOptions+ inherits from +Hash+ and provides dynamic accessor methods. +# +# With a +Hash+, key-value pairs are typically managed like this: +# +# h = {} +# h[:boy] = 'John' +# h[:girl] = 'Mary' +# h[:boy] # => 'John' +# h[:girl] # => 'Mary' +# h[:dog] # => nil +# +# Using +OrderedOptions+, the above code can be written as: +# +# h = ActiveSupport::OrderedOptions.new +# h.boy = 'John' +# h.girl = 'Mary' +# h.boy # => 'John' +# h.girl # => 'Mary' +# h.dog # => nil +# +# To raise an exception when the value is blank, append a +# bang to the key name, like: +# +# h.dog! # => raises KeyError: :dog is blank +# +# source://activesupport//lib/active_support/ordered_options.rb#31 +class ActiveSupport::OrderedOptions < ::Hash + # source://activesupport//lib/active_support/ordered_options.rb#39 + def [](key); end + + # source://activesupport//lib/active_support/ordered_options.rb#35 + def []=(key, value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/ordered_options.rb#62 + def extractable_options?; end + + # source://activesupport//lib/active_support/ordered_options.rb#66 + def inspect; end + + # source://activesupport//lib/active_support/ordered_options.rb#43 + def method_missing(name, *args); end + + protected + + # preserve the original #[] method + def _get(_arg0); end + + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/ordered_options.rb#58 + def respond_to_missing?(name, include_private); end +end + +# +ParameterFilter+ allows you to specify keys for sensitive data from +# hash-like object and replace corresponding value. Filtering only certain +# sub-keys from a hash is possible by using the dot notation: +# 'credit_card.number'. If a proc is given, each key and value of a hash and +# all sub-hashes are passed to it, where the value or the key can be replaced +# using String#replace or similar methods. +# +# ActiveSupport::ParameterFilter.new([:password]) +# => replaces the value to all keys matching /password/i with "[FILTERED]" +# +# ActiveSupport::ParameterFilter.new([:foo, "bar"]) +# => replaces the value to all keys matching /foo|bar/i with "[FILTERED]" +# +# ActiveSupport::ParameterFilter.new([/\Apin\z/i, /\Apin_/i]) +# => replaces the value for the exact (case-insensitive) key 'pin' and all +# (case-insensitive) keys beginning with 'pin_', with "[FILTERED]". +# Does not match keys with 'pin' as a substring, such as 'shipping_id'. +# +# ActiveSupport::ParameterFilter.new(["credit_card.code"]) +# => replaces { credit_card: {code: "xxxx"} } with "[FILTERED]", does not +# change { file: { code: "xxxx"} } +# +# ActiveSupport::ParameterFilter.new([-> (k, v) do +# v.reverse! if /secret/i.match?(k) +# end]) +# => reverses the value to all keys matching /secret/i +# +# source://activesupport//lib/active_support/parameter_filter.rb#32 +class ActiveSupport::ParameterFilter + # Create instance with given filters. Supported type of filters are +String+, +Regexp+, and +Proc+. + # Other types of filters are treated as +String+ using +to_s+. + # For +Proc+ filters, key, value, and optional original hash is passed to block arguments. + # + # ==== Options + # + # * :mask - A replaced object when filtered. Defaults to "[FILTERED]". + # + # @return [ParameterFilter] a new instance of ParameterFilter + # + # source://activesupport//lib/active_support/parameter_filter.rb#42 + def initialize(filters = T.unsafe(nil), mask: T.unsafe(nil)); end + + # Mask value of +params+ if key matches one of filters. + # + # source://activesupport//lib/active_support/parameter_filter.rb#48 + def filter(params); end + + # Returns filtered value for given key. For +Proc+ filters, third block argument is not populated. + # + # source://activesupport//lib/active_support/parameter_filter.rb#53 + def filter_param(key, value); end + + private + + # source://activesupport//lib/active_support/parameter_filter.rb#58 + def compiled_filter; end +end + +# source://activesupport//lib/active_support/parameter_filter.rb#62 +class ActiveSupport::ParameterFilter::CompiledFilter + # @return [CompiledFilter] a new instance of CompiledFilter + # + # source://activesupport//lib/active_support/parameter_filter.rb#96 + def initialize(regexps, deep_regexps, blocks, mask:); end + + # Returns the value of attribute blocks. + # + # source://activesupport//lib/active_support/parameter_filter.rb#94 + def blocks; end + + # source://activesupport//lib/active_support/parameter_filter.rb#103 + def call(params, parents = T.unsafe(nil), original_params = T.unsafe(nil)); end + + # Returns the value of attribute deep_regexps. + # + # source://activesupport//lib/active_support/parameter_filter.rb#94 + def deep_regexps; end + + # Returns the value of attribute regexps. + # + # source://activesupport//lib/active_support/parameter_filter.rb#94 + def regexps; end + + # source://activesupport//lib/active_support/parameter_filter.rb#113 + def value_for_key(key, value, parents = T.unsafe(nil), original_params = T.unsafe(nil)); end + + class << self + # source://activesupport//lib/active_support/parameter_filter.rb#63 + def compile(filters, mask:); end + end +end + +# source://activesupport//lib/active_support/parameter_filter.rb#33 +ActiveSupport::ParameterFilter::FILTERED = T.let(T.unsafe(nil), String) + +# NOTE: This approach has been deprecated for end-user code in favor of {thread_mattr_accessor}[rdoc-ref:Module#thread_mattr_accessor] and friends. +# Please use that approach instead. +# +# This module is used to encapsulate access to thread local variables. +# +# Instead of polluting the thread locals namespace: +# +# Thread.current[:connection_handler] +# +# you define a class that extends this module: +# +# module ActiveRecord +# class RuntimeRegistry +# extend ActiveSupport::PerThreadRegistry +# +# attr_accessor :connection_handler +# end +# end +# +# and invoke the declared instance accessors as class methods. So +# +# ActiveRecord::RuntimeRegistry.connection_handler = connection_handler +# +# sets a connection handler local to the current thread, and +# +# ActiveRecord::RuntimeRegistry.connection_handler +# +# returns a connection handler local to the current thread. +# +# This feature is accomplished by instantiating the class and storing the +# instance as a thread local keyed by the class name. In the example above +# a key "ActiveRecord::RuntimeRegistry" is stored in Thread.current. +# The class methods proxy to said thread local instance. +# +# If the class has an initializer, it must accept no arguments. +# +# source://activesupport//lib/active_support/per_thread_registry.rb#41 +module ActiveSupport::PerThreadRegistry + # source://activesupport//lib/active_support/per_thread_registry.rb#50 + def instance; end + + private + + # source://activesupport//lib/active_support/per_thread_registry.rb#55 + def method_missing(name, *args, **_arg2, &block); end + + class << self + # @private + # + # source://activesupport//lib/active_support/per_thread_registry.rb#42 + def extended(object); end + end +end + +# A class with no predefined methods that behaves similarly to Builder's +# BlankSlate. Used for proxy classes. +# +# source://activesupport//lib/active_support/proxy_object.rb#6 +class ActiveSupport::ProxyObject < ::BasicObject + # Let ActiveSupport::ProxyObject at least raise exceptions. + # + # source://activesupport//lib/active_support/proxy_object.rb#11 + def raise(*args); end +end + +# source://activesupport//lib/active_support/railtie.rb#7 +class ActiveSupport::Railtie < ::Rails::Railtie; end + +# -- +# This class defines several callbacks: +# +# to_prepare -- Run once at application startup, and also from +# +to_run+. +# +# to_run -- Run before a work run that is reloading. If +# +reload_classes_only_on_change+ is true (the default), the class +# unload will have already occurred. +# +# to_complete -- Run after a work run that has reloaded. If +# +reload_classes_only_on_change+ is false, the class unload will +# have occurred after the work run, but before this callback. +# +# before_class_unload -- Run immediately before the classes are +# unloaded. +# +# after_class_unload -- Run immediately after the classes are +# unloaded. +# +# source://activesupport//lib/active_support/reloader.rb#27 +class ActiveSupport::Reloader < ::ActiveSupport::ExecutionWrapper + # @return [Reloader] a new instance of Reloader + # + # source://activesupport//lib/active_support/reloader.rb#91 + def initialize; end + + # source://activesupport//lib/active_support/callbacks.rb#940 + def _class_unload_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#940 + def _prepare_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#928 + def _run_class_unload_callbacks(&block); end + + # source://activesupport//lib/active_support/callbacks.rb#928 + def _run_prepare_callbacks(&block); end + + # source://activesupport//lib/active_support/reloader.rb#77 + def check; end + + # source://activesupport//lib/active_support/reloader.rb#77 + def check=(_arg0); end + + # source://activesupport//lib/active_support/reloader.rb#77 + def check?; end + + # source://activesupport//lib/active_support/reloader.rb#118 + def class_unload!(&block); end + + # source://activesupport//lib/active_support/reloader.rb#123 + def complete!; end + + # source://activesupport//lib/active_support/reloader.rb#76 + def executor; end + + # source://activesupport//lib/active_support/reloader.rb#76 + def executor=(_arg0); end + + # source://activesupport//lib/active_support/reloader.rb#76 + def executor?; end + + # Release the unload lock if it has been previously obtained + # + # source://activesupport//lib/active_support/reloader.rb#106 + def release_unload_lock!; end + + # Acquire the ActiveSupport::Dependencies::Interlock unload lock, + # ensuring it will be released automatically + # + # source://activesupport//lib/active_support/reloader.rb#98 + def require_unload_lock!; end + + # source://activesupport//lib/active_support/reloader.rb#113 + def run!; end + + class << self + # source://activesupport//lib/active_support/callbacks.rb#68 + def __callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#932 + def _class_unload_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#936 + def _class_unload_callbacks=(value); end + + # source://activesupport//lib/active_support/callbacks.rb#932 + def _prepare_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#936 + def _prepare_callbacks=(value); end + + # Registers a callback that will run immediately after the classes are unloaded. + # + # source://activesupport//lib/active_support/reloader.rb#43 + def after_class_unload(*args, &block); end + + # Registers a callback that will run immediately before the classes are unloaded. + # + # source://activesupport//lib/active_support/reloader.rb#38 + def before_class_unload(*args, &block); end + + # source://activesupport//lib/active_support/reloader.rb#77 + def check; end + + # source://activesupport//lib/active_support/reloader.rb#79 + def check!; end + + # source://activesupport//lib/active_support/reloader.rb#77 + def check=(value); end + + # source://activesupport//lib/active_support/reloader.rb#77 + def check?; end + + # source://activesupport//lib/active_support/reloader.rb#76 + def executor; end + + # source://activesupport//lib/active_support/reloader.rb#76 + def executor=(value); end + + # source://activesupport//lib/active_support/reloader.rb#76 + def executor?; end + + # source://activesupport//lib/active_support/reloader.rb#87 + def prepare!; end + + # Initiate a manual reload + # + # source://activesupport//lib/active_support/reloader.rb#50 + def reload!; end + + # source://activesupport//lib/active_support/reloader.rb#83 + def reloaded!; end + + # source://activesupport//lib/active_support/reloader.rb#61 + def run!(reset: T.unsafe(nil)); end + + # Registers a callback that will run once at application startup and every time the code is reloaded. + # + # source://activesupport//lib/active_support/reloader.rb#33 + def to_prepare(*args, &block); end + + # Run the supplied block as a work unit, reloading code as needed + # + # source://activesupport//lib/active_support/reloader.rb#70 + def wrap; end + end +end + +# Rescuable module adds support for easier exception handling. +# +# source://activesupport//lib/active_support/rescuable.rb#9 +module ActiveSupport::Rescuable + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveSupport::Rescuable::ClassMethods + + # Internal handler lookup. Delegates to class method. Some libraries call + # this directly, so keeping it around for compatibility. + # + # source://activesupport//lib/active_support/rescuable.rb#170 + def handler_for_rescue(exception); end + + # Delegates to the class method, but uses the instance as the subject for + # rescue_from handlers (method calls, +instance_exec+ blocks). + # + # source://activesupport//lib/active_support/rescuable.rb#164 + def rescue_with_handler(exception); end + + module GeneratedClassMethods + def rescue_handlers; end + def rescue_handlers=(value); end + def rescue_handlers?; end + end + + module GeneratedInstanceMethods + def rescue_handlers; end + def rescue_handlers=(value); end + def rescue_handlers?; end + end +end + +# source://activesupport//lib/active_support/rescuable.rb#16 +module ActiveSupport::Rescuable::ClassMethods + # source://activesupport//lib/active_support/rescuable.rb#103 + def handler_for_rescue(exception, object: T.unsafe(nil)); end + + # Registers exception classes with a handler to be called by rescue_with_handler. + # + # rescue_from receives a series of exception classes or class + # names, and an exception handler specified by a trailing :with + # option containing the name of a method or a Proc object. Alternatively, a block + # can be given as the handler. + # + # Handlers that take one argument will be called with the exception, so + # that the exception can be inspected when dealing with it. + # + # Handlers are inherited. They are searched from right to left, from + # bottom to top, and up the hierarchy. The handler of the first class for + # which exception.is_a?(klass) holds true is the one invoked, if + # any. + # + # class ApplicationController < ActionController::Base + # rescue_from User::NotAuthorized, with: :deny_access + # rescue_from ActiveRecord::RecordInvalid, with: :show_record_errors + # + # rescue_from "MyApp::BaseError" do |exception| + # redirect_to root_url, alert: exception.message + # end + # + # private + # def deny_access + # head :forbidden + # end + # + # def show_record_errors(exception) + # redirect_back_or_to root_url, alert: exception.record.errors.full_messages.to_sentence + # end + # end + # + # Exceptions raised inside exception handlers are not propagated up. + # + # source://activesupport//lib/active_support/rescuable.rb#51 + def rescue_from(*klasses, with: T.unsafe(nil), &block); end + + # Matches an exception to a handler based on the exception class. + # + # If no handler matches the exception, check for a handler matching the + # (optional) +exception.cause+. If no handler matches the exception or its + # cause, this returns +nil+, so you can deal with unhandled exceptions. + # Be sure to re-raise unhandled exceptions if this is what you expect. + # + # begin + # # ... + # rescue => exception + # rescue_with_handler(exception) || raise + # end + # + # Returns the exception if it was handled and +nil+ if it was not. + # + # source://activesupport//lib/active_support/rescuable.rb#88 + def rescue_with_handler(exception, object: T.unsafe(nil), visited_exceptions: T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/rescuable.rb#137 + def constantize_rescue_handler_class(class_or_name); end + + # source://activesupport//lib/active_support/rescuable.rb#122 + def find_rescue_handler(exception); end +end + +# source://activesupport//lib/active_support/ruby_features.rb#4 +module ActiveSupport::RubyFeatures; end + +# RUBY_VERSION >= "3.1" +# +# source://activesupport//lib/active_support/ruby_features.rb#5 +ActiveSupport::RubyFeatures::CLASS_SUBCLASSES = T.let(T.unsafe(nil), TrueClass) + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#162 +class ActiveSupport::SafeBuffer < ::String + # @return [SafeBuffer] a new instance of SafeBuffer + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#200 + def initialize(str = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#257 + def %(args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#250 + def *(*_arg0); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#246 + def +(other); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#214 + def <<(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#181 + def [](*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#238 + def []=(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#222 + def bytesplice(*args, value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def capitalize(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def capitalize!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def chomp(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def chomp!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def chop(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def chop!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#210 + def clone_empty; end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#214 + def concat(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def delete(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def delete!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def delete_prefix(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def delete_prefix!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def delete_suffix(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def delete_suffix!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def downcase(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def downcase!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#280 + def encode_with(coder); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#301 + def gsub(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#312 + def gsub!(*args, &block); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#268 + def html_safe?; end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#226 + def insert(index, value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def lstrip(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def lstrip!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def next(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def next!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#230 + def prepend(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#234 + def replace(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def reverse(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def reverse!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def rstrip(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def rstrip!(*args); end + + # @raise [SafeConcatError] + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#195 + def safe_concat(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def scrub(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def scrub!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def slice(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def slice!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def squeeze(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def squeeze!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def strip(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def strip!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#301 + def sub(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#312 + def sub!(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def succ(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def succ!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def swapcase(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def swapcase!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#276 + def to_param; end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#272 + def to_s; end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def tr(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def tr!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def tr_s(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def tr_s!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def unicode_normalize(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def unicode_normalize!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#287 + def upcase(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#291 + def upcase!(*args); end + + private + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#327 + def explicit_html_escape_interpolated_argument(arg); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#331 + def implicit_html_escape_interpolated_argument(arg); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#205 + def initialize_copy(other); end + + def original_concat(*_arg0); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#354 + def set_block_back_references(block, match_data); end +end + +# Raised when ActiveSupport::SafeBuffer#safe_concat is called on unsafe buffers. +# +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#175 +class ActiveSupport::SafeBuffer::SafeConcatError < ::StandardError + # @return [SafeConcatError] a new instance of SafeConcatError + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#176 + def initialize; end +end + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#163 +ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#169 +ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS_WITH_BACKREF = T.let(T.unsafe(nil), Array) + +# The ActiveSupport::SecureCompareRotator is a wrapper around ActiveSupport::SecurityUtils.secure_compare +# and allows you to rotate a previously defined value to a new one. +# +# It can be used as follow: +# +# rotator = ActiveSupport::SecureCompareRotator.new('new_production_value') +# rotator.rotate('previous_production_value') +# rotator.secure_compare!('previous_production_value') +# +# One real use case example would be to rotate a basic auth credentials: +# +# class MyController < ApplicationController +# def authenticate_request +# rotator = ActiveSupport::SecureCompareRotator.new('new_password') +# rotator.rotate('old_password') +# +# authenticate_or_request_with_http_basic do |username, password| +# rotator.secure_compare!(password) +# rescue ActiveSupport::SecureCompareRotator::InvalidMatch +# false +# end +# end +# end +# +# source://activesupport//lib/active_support/secure_compare_rotator.rb#30 +class ActiveSupport::SecureCompareRotator + include ::ActiveSupport::Messages::Rotator + include ::ActiveSupport::SecurityUtils + + # @return [SecureCompareRotator] a new instance of SecureCompareRotator + # + # source://activesupport//lib/active_support/messages/rotator.rb#6 + def initialize(*secrets, on_rotation: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/secure_compare_rotator.rb#40 + def secure_compare!(other_value, on_rotation: T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/secure_compare_rotator.rb#47 + def build_rotation(previous_value, _options); end +end + +# source://activesupport//lib/active_support/secure_compare_rotator.rb#34 +class ActiveSupport::SecureCompareRotator::InvalidMatch < ::StandardError; end + +# source://activesupport//lib/active_support/security_utils.rb#4 +module ActiveSupport::SecurityUtils + private + + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/security_utils.rb#11 + def fixed_length_secure_compare(a, b); end + + # Secure string comparison for strings of variable length. + # + # While a timing attack would not be able to discern the content of + # a secret compared via secure_compare, it is possible to determine + # the secret length. This should be considered when using secure_compare + # to compare weak, short secrets to user input. + # + # source://activesupport//lib/active_support/security_utils.rb#33 + def secure_compare(a, b); end + + class << self + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/security_utils.rb#11 + def fixed_length_secure_compare(a, b); end + + # Secure string comparison for strings of variable length. + # + # While a timing attack would not be able to discern the content of + # a secret compared via secure_compare, it is possible to determine + # the secret length. This should be considered when using secure_compare + # to compare weak, short secrets to user input. + # + # source://activesupport//lib/active_support/security_utils.rb#33 + def secure_compare(a, b); end + end +end + +# Wrapping a string in this class gives you a prettier way to test +# for equality. The value returned by Rails.env is wrapped +# in a StringInquirer object, so instead of calling this: +# +# Rails.env == 'production' +# +# you can call this: +# +# Rails.env.production? +# +# == Instantiating a new StringInquirer +# +# vehicle = ActiveSupport::StringInquirer.new('car') +# vehicle.car? # => true +# vehicle.bike? # => false +# +# source://activesupport//lib/active_support/string_inquirer.rb#19 +class ActiveSupport::StringInquirer < ::String + private + + # source://activesupport//lib/active_support/string_inquirer.rb#25 + def method_missing(method_name, *arguments); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/string_inquirer.rb#21 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end +end + +# ActiveSupport::Subscriber is an object set to consume +# ActiveSupport::Notifications. The subscriber dispatches notifications to +# a registered object based on its given namespace. +# +# An example would be an Active Record subscriber responsible for collecting +# statistics about queries: +# +# module ActiveRecord +# class StatsSubscriber < ActiveSupport::Subscriber +# attach_to :active_record +# +# def sql(event) +# Statsd.timing("sql.#{event.payload[:name]}", event.duration) +# end +# end +# end +# +# After configured, whenever a "sql.active_record" notification is published, +# it will properly dispatch the event (ActiveSupport::Notifications::Event) to +# the +sql+ method. +# +# We can detach a subscriber as well: +# +# ActiveRecord::StatsSubscriber.detach_from(:active_record) +# +# source://activesupport//lib/active_support/subscriber.rb#30 +class ActiveSupport::Subscriber + # @return [Subscriber] a new instance of Subscriber + # + # source://activesupport//lib/active_support/subscriber.rb#128 + def initialize; end + + # source://activesupport//lib/active_support/subscriber.rb#143 + def finish(name, id, payload); end + + # source://activesupport//lib/active_support/subscriber.rb#126 + def patterns; end + + # source://activesupport//lib/active_support/subscriber.rb#152 + def publish_event(event); end + + # source://activesupport//lib/active_support/subscriber.rb#134 + def start(name, id, payload); end + + private + + # source://activesupport//lib/active_support/subscriber.rb#158 + def event_stack; end + + class << self + # Attach the subscriber to a namespace. + # + # source://activesupport//lib/active_support/subscriber.rb#33 + def attach_to(namespace, subscriber = T.unsafe(nil), notifier = T.unsafe(nil), inherit_all: T.unsafe(nil)); end + + # Detach the subscriber from a namespace. + # + # source://activesupport//lib/active_support/subscriber.rb#48 + def detach_from(namespace, notifier = T.unsafe(nil)); end + + # Adds event subscribers for all new methods added to the class. + # + # source://activesupport//lib/active_support/subscriber.rb#67 + def method_added(event); end + + # source://activesupport//lib/active_support/subscriber.rb#76 + def subscribers; end + + private + + # source://activesupport//lib/active_support/subscriber.rb#83 + def add_event_subscriber(event); end + + # source://activesupport//lib/active_support/subscriber.rb#121 + def fetch_public_methods(subscriber, inherit_all); end + + # source://activesupport//lib/active_support/subscriber.rb#105 + def find_attached_subscriber; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/subscriber.rb#109 + def invalid_event?(event); end + + # Returns the value of attribute namespace. + # + # source://activesupport//lib/active_support/subscriber.rb#81 + def namespace; end + + # Returns the value of attribute notifier. + # + # source://activesupport//lib/active_support/subscriber.rb#81 + def notifier; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/subscriber.rb#117 + def pattern_subscribed?(pattern); end + + # source://activesupport//lib/active_support/subscriber.rb#113 + def prepare_pattern(event); end + + # source://activesupport//lib/active_support/subscriber.rb#94 + def remove_event_subscriber(event); end + + # Returns the value of attribute subscriber. + # + # source://activesupport//lib/active_support/subscriber.rb#81 + def subscriber; end + end +end + +# Wraps any standard Logger object to provide tagging capabilities. +# +# May be called with a block: +# +# logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT)) +# logger.tagged('BCX') { logger.info 'Stuff' } # Logs "[BCX] Stuff" +# logger.tagged('BCX', "Jason") { logger.info 'Stuff' } # Logs "[BCX] [Jason] Stuff" +# logger.tagged('BCX') { logger.tagged('Jason') { logger.info 'Stuff' } } # Logs "[BCX] [Jason] Stuff" +# +# If called without a block, a new logger will be returned with applied tags: +# +# logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT)) +# logger.tagged("BCX").info "Stuff" # Logs "[BCX] Stuff" +# logger.tagged("BCX", "Jason").info "Stuff" # Logs "[BCX] [Jason] Stuff" +# logger.tagged("BCX").tagged("Jason").info "Stuff" # Logs "[BCX] [Jason] Stuff" +# +# This is used by the default Rails.logger as configured by Railties to make +# it easy to stamp log lines with subdomains, request ids, and anything else +# to aid debugging of multi-user production applications. +# +# source://activesupport//lib/active_support/tagged_logging.rb#28 +module ActiveSupport::TaggedLogging + # source://activesupport//lib/active_support/tagged_logging.rb#95 + def clear_tags!(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/tagged_logging.rb#108 + def flush; end + + # source://activesupport//lib/active_support/tagged_logging.rb#95 + def pop_tags(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/tagged_logging.rb#95 + def push_tags(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/tagged_logging.rb#97 + def tagged(*tags); end + + class << self + # source://activesupport//lib/active_support/tagged_logging.rb#81 + def new(logger); end + end +end + +# source://activesupport//lib/active_support/tagged_logging.rb#29 +module ActiveSupport::TaggedLogging::Formatter + # This method is invoked when a log event occurs. + # + # source://activesupport//lib/active_support/tagged_logging.rb#31 + def call(severity, timestamp, progname, msg); end + + # source://activesupport//lib/active_support/tagged_logging.rb#53 + def clear_tags!; end + + # source://activesupport//lib/active_support/tagged_logging.rb#57 + def current_tags; end + + # source://activesupport//lib/active_support/tagged_logging.rb#49 + def pop_tags(size = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/tagged_logging.rb#42 + def push_tags(*tags); end + + # source://activesupport//lib/active_support/tagged_logging.rb#35 + def tagged(*tags); end + + # source://activesupport//lib/active_support/tagged_logging.rb#63 + def tags_text; end +end + +# source://activesupport//lib/active_support/tagged_logging.rb#73 +module ActiveSupport::TaggedLogging::LocalTagStorage + # Returns the value of attribute current_tags. + # + # source://activesupport//lib/active_support/tagged_logging.rb#74 + def current_tags; end + + # Sets the attribute current_tags + # + # @param value the value to set the attribute current_tags to. + # + # source://activesupport//lib/active_support/tagged_logging.rb#74 + def current_tags=(_arg0); end + + class << self + # @private + # + # source://activesupport//lib/active_support/tagged_logging.rb#76 + def extended(base); end + end +end + +# source://activesupport//lib/active_support/test_case.rb#19 +class ActiveSupport::TestCase < ::Minitest::Test + include ::ActiveSupport::Testing::SetupAndTeardown + include ::ActiveSupport::Testing::TaggedLogging + include ::ActiveSupport::Callbacks + include ::ActiveSupport::Testing::Assertions + include ::ActiveSupport::Testing::Deprecation + include ::ActiveSupport::Testing::TimeHelpers + include ::ActiveSupport::Testing::FileFixtures + extend ::ActiveSupport::Callbacks::ClassMethods + extend ::ActiveSupport::DescendantsTracker + extend ::ActiveSupport::Testing::SetupAndTeardown::ClassMethods + extend ::ActiveSupport::Testing::Declarative + + # source://activesupport//lib/active_support/callbacks.rb#68 + def __callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#68 + def __callbacks?; end + + # source://activesupport//lib/active_support/callbacks.rb#928 + def _run_setup_callbacks(&block); end + + # source://activesupport//lib/active_support/callbacks.rb#928 + def _run_teardown_callbacks(&block); end + + # source://activesupport//lib/active_support/callbacks.rb#940 + def _setup_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#940 + def _teardown_callbacks; end + + # source://minitest/5.18.0/lib/minitest/assertions.rb#735 + def assert_no_match(matcher, obj, msg = T.unsafe(nil)); end + + # source://minitest/5.18.0/lib/minitest/assertions.rb#664 + def assert_not_empty(obj, msg = T.unsafe(nil)); end + + # source://minitest/5.18.0/lib/minitest/assertions.rb#675 + def assert_not_equal(exp, act, msg = T.unsafe(nil)); end + + # source://minitest/5.18.0/lib/minitest/assertions.rb#687 + def assert_not_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end + + # source://minitest/5.18.0/lib/minitest/assertions.rb#699 + def assert_not_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end + + # source://minitest/5.18.0/lib/minitest/assertions.rb#706 + def assert_not_includes(collection, obj, msg = T.unsafe(nil)); end + + # source://minitest/5.18.0/lib/minitest/assertions.rb#717 + def assert_not_instance_of(cls, obj, msg = T.unsafe(nil)); end + + # source://minitest/5.18.0/lib/minitest/assertions.rb#727 + def assert_not_kind_of(cls, obj, msg = T.unsafe(nil)); end + + # source://minitest/5.18.0/lib/minitest/assertions.rb#745 + def assert_not_nil(obj, msg = T.unsafe(nil)); end + + # source://minitest/5.18.0/lib/minitest/assertions.rb#780 + def assert_not_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end + + # source://minitest/5.18.0/lib/minitest/assertions.rb#803 + def assert_not_predicate(o1, op, msg = T.unsafe(nil)); end + + # source://minitest/5.18.0/lib/minitest/assertions.rb#811 + def assert_not_respond_to(obj, meth, msg = T.unsafe(nil)); end + + # source://minitest/5.18.0/lib/minitest/assertions.rb#820 + def assert_not_same(exp, act, msg = T.unsafe(nil)); end + + # test/unit backwards compatibility methods + # + # source://minitest/5.18.0/lib/minitest/assertions.rb#422 + def assert_raise(*exp); end + + # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 + def file_fixture_path; end + + # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 + def file_fixture_path?; end + + # source://activesupport//lib/active_support/test_case.rb#151 + def inspect; end + + # source://minitest/5.18.0/lib/minitest.rb#304 + def method_name; end + + class << self + # source://activesupport//lib/active_support/callbacks.rb#68 + def __callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#68 + def __callbacks=(value); end + + # source://activesupport//lib/active_support/callbacks.rb#68 + def __callbacks?; end + + # source://activesupport//lib/active_support/callbacks.rb#932 + def _setup_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#936 + def _setup_callbacks=(value); end + + # source://activesupport//lib/active_support/callbacks.rb#932 + def _teardown_callbacks; end + + # source://activesupport//lib/active_support/callbacks.rb#936 + def _teardown_callbacks=(value); end + + # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 + def file_fixture_path; end + + # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 + def file_fixture_path=(value); end + + # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 + def file_fixture_path?; end + + # Parallelizes the test suite. + # + # Takes a +workers+ argument that controls how many times the process + # is forked. For each process a new database will be created suffixed + # with the worker number. + # + # test-database-0 + # test-database-1 + # + # If ENV["PARALLEL_WORKERS"] is set the workers argument will be ignored + # and the environment variable will be used instead. This is useful for CI + # environments, or other environments where you may need more workers than + # you do for local testing. + # + # If the number of workers is set to +1+ or fewer, the tests will not be + # parallelized. + # + # If +workers+ is set to +:number_of_processors+, the number of workers will be + # set to the actual core count on the machine you are on. + # + # The default parallelization method is to fork processes. If you'd like to + # use threads instead you can pass with: :threads to the +parallelize+ + # method. Note the threaded parallelization does not create multiple + # database and will not work with system tests at this time. + # + # parallelize(workers: :number_of_processors, with: :threads) + # + # The threaded parallelization uses minitest's parallel executor directly. + # The processes parallelization uses a Ruby DRb server. + # + # Because parallelization presents an overhead, it is only enabled when the + # number of tests to run is above the +threshold+ param. The default value is + # 50, and it's configurable via +config.active_support.test_parallelization_threshold+. + # + # source://activesupport//lib/active_support/test_case.rb#79 + def parallelize(workers: T.unsafe(nil), with: T.unsafe(nil), threshold: T.unsafe(nil)); end + + # Set up hook for parallel testing. This can be used if you have multiple + # databases or any behavior that needs to be run after the process is forked + # but before the tests run. + # + # Note: this feature is not available with the threaded parallelization. + # + # In your +test_helper.rb+ add the following: + # + # class ActiveSupport::TestCase + # parallelize_setup do + # # create databases + # end + # end + # + # source://activesupport//lib/active_support/test_case.rb#101 + def parallelize_setup(&block); end + + # Clean up hook for parallel testing. This can be used to drop databases + # if your app uses multiple write/read databases or other clean up before + # the tests finish. This runs before the forked process is closed. + # + # Note: this feature is not available with the threaded parallelization. + # + # In your +test_helper.rb+ add the following: + # + # class ActiveSupport::TestCase + # parallelize_teardown do + # # drop databases + # end + # end + # + # source://activesupport//lib/active_support/test_case.rb#118 + def parallelize_teardown(&block); end + + # Returns the order in which test cases are run. + # + # ActiveSupport::TestCase.test_order # => :random + # + # Possible values are +:random+, +:parallel+, +:alpha+, +:sorted+. + # Defaults to +:random+. + # + # source://activesupport//lib/active_support/test_case.rb#42 + def test_order; end + + # Sets the order in which test cases are run. + # + # ActiveSupport::TestCase.test_order = :random # => :random + # + # Valid values are: + # * +:random+ (to run tests in random order) + # * +:parallel+ (to run tests in parallel) + # * +:sorted+ (to run tests alphabetically by method name) + # * +:alpha+ (equivalent to +:sorted+) + # + # source://activesupport//lib/active_support/test_case.rb#32 + def test_order=(new_order); end + end +end + +# source://activesupport//lib/active_support/test_case.rb#20 +ActiveSupport::TestCase::Assertion = Minitest::Assertion + +# source://activesupport//lib/active_support/testing/tagged_logging.rb#4 +module ActiveSupport::Testing; end + +# source://activesupport//lib/active_support/testing/assertions.rb#7 +module ActiveSupport::Testing::Assertions + # Assertion that the result of evaluating an expression is changed before + # and after invoking the passed in block. + # + # assert_changes 'Status.all_good?' do + # post :create, params: { status: { ok: false } } + # end + # + # You can pass the block as a string to be evaluated in the context of + # the block. A lambda can be passed for the block as well. + # + # assert_changes -> { Status.all_good? } do + # post :create, params: { status: { ok: false } } + # end + # + # The assertion is useful to test side effects. The passed block can be + # anything that can be converted to string with #to_s. + # + # assert_changes :@object do + # @object = 42 + # end + # + # The keyword arguments +:from+ and +:to+ can be given to specify the + # expected initial value and the expected value after the block was + # executed. + # + # assert_changes :@object, from: nil, to: :foo do + # @object = :foo + # end + # + # An error message can be specified. + # + # assert_changes -> { Status.all_good? }, 'Expected the status to be bad' do + # post :create, params: { status: { incident: true } } + # end + # + # source://activesupport//lib/active_support/testing/assertions.rb#175 + def assert_changes(expression, message = T.unsafe(nil), from: T.unsafe(nil), to: T.unsafe(nil), &block); end + + # Test numeric difference between the return value of an expression as a + # result of what is evaluated in the yielded block. + # + # assert_difference 'Article.count' do + # post :create, params: { article: {...} } + # end + # + # An arbitrary expression is passed in and evaluated. + # + # assert_difference 'Article.last.comments(:reload).size' do + # post :create, params: { comment: {...} } + # end + # + # An arbitrary positive or negative difference can be specified. + # The default is 1. + # + # assert_difference 'Article.count', -1 do + # post :delete, params: { id: ... } + # end + # + # An array of expressions can also be passed in and evaluated. + # + # assert_difference [ 'Article.count', 'Post.count' ], 2 do + # post :create, params: { article: {...} } + # end + # + # A hash of expressions/numeric differences can also be passed in and evaluated. + # + # assert_difference ->{ Article.count } => 1, ->{ Notification.count } => 2 do + # post :create, params: { article: {...} } + # end + # + # A lambda or a list of lambdas can be passed in and evaluated: + # + # assert_difference ->{ Article.count }, 2 do + # post :create, params: { article: {...} } + # end + # + # assert_difference [->{ Article.count }, ->{ Post.count }], 2 do + # post :create, params: { article: {...} } + # end + # + # An error message can be specified. + # + # assert_difference 'Article.count', -1, 'An Article should be destroyed' do + # post :delete, params: { id: ... } + # end + # + # source://activesupport//lib/active_support/testing/assertions.rb#86 + def assert_difference(expression, *args, &block); end + + # Assertion that the result of evaluating an expression is not changed before + # and after invoking the passed in block. + # + # assert_no_changes 'Status.all_good?' do + # post :create, params: { status: { ok: true } } + # end + # + # Provide the optional keyword argument :from to specify the expected + # initial value. + # + # assert_no_changes -> { Status.all_good? }, from: true do + # post :create, params: { status: { ok: true } } + # end + # + # An error message can be specified. + # + # assert_no_changes -> { Status.all_good? }, 'Expected the status to be good' do + # post :create, params: { status: { ok: false } } + # end + # + # source://activesupport//lib/active_support/testing/assertions.rb#222 + def assert_no_changes(expression, message = T.unsafe(nil), from: T.unsafe(nil), &block); end + + # Assertion that the numeric result of evaluating an expression is not + # changed before and after invoking the passed in block. + # + # assert_no_difference 'Article.count' do + # post :create, params: { article: invalid_attributes } + # end + # + # A lambda can be passed in and evaluated. + # + # assert_no_difference -> { Article.count } do + # post :create, params: { article: invalid_attributes } + # end + # + # An error message can be specified. + # + # assert_no_difference 'Article.count', 'An Article should not be created' do + # post :create, params: { article: invalid_attributes } + # end + # + # An array of expressions can also be passed in and evaluated. + # + # assert_no_difference [ 'Article.count', -> { Post.count } ] do + # post :create, params: { article: invalid_attributes } + # end + # + # source://activesupport//lib/active_support/testing/assertions.rb#137 + def assert_no_difference(expression, message = T.unsafe(nil), &block); end + + # Asserts that an expression is not truthy. Passes if object is + # +nil+ or +false+. "Truthy" means "considered true in a conditional" + # like if foo. + # + # assert_not nil # => true + # assert_not false # => true + # assert_not 'foo' # => Expected "foo" to be nil or false + # + # An error message can be specified. + # + # assert_not foo, 'foo should be false' + # + # source://activesupport//lib/active_support/testing/assertions.rb#21 + def assert_not(object, message = T.unsafe(nil)); end + + # Assertion that the block should not raise an exception. + # + # Passes if evaluated code in the yielded block raises no exception. + # + # assert_nothing_raised do + # perform_service(param: 'no_exception') + # end + # + # source://activesupport//lib/active_support/testing/assertions.rb#33 + def assert_nothing_raised; end + + private + + # source://activesupport//lib/active_support/testing/assertions.rb#249 + def _assert_nothing_raised_or_warn(assertion, &block); end +end + +# source://activesupport//lib/active_support/testing/assertions.rb#8 +ActiveSupport::Testing::Assertions::UNTRACKED = T.let(T.unsafe(nil), Object) + +# Resolves a constant from a minitest spec name. +# +# Given the following spec-style test: +# +# describe WidgetsController, :index do +# describe "authenticated user" do +# describe "returns widgets" do +# it "has a controller that exists" do +# assert_kind_of WidgetsController, @controller +# end +# end +# end +# end +# +# The test will have the following name: +# +# "WidgetsController::index::authenticated user::returns widgets" +# +# The constant WidgetsController can be resolved from the name. +# The following code will resolve the constant: +# +# controller = determine_constant_from_test_name(name) do |constant| +# Class === constant && constant < ::ActionController::Metal +# end +# +# source://activesupport//lib/active_support/testing/constant_lookup.rb#32 +module ActiveSupport::Testing::ConstantLookup + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods +end + +# source://activesupport//lib/active_support/testing/constant_lookup.rb#35 +module ActiveSupport::Testing::ConstantLookup::ClassMethods + # source://activesupport//lib/active_support/testing/constant_lookup.rb#36 + def determine_constant_from_test_name(test_name); end +end + +# source://activesupport//lib/active_support/testing/declarative.rb#5 +module ActiveSupport::Testing::Declarative + # Helper to define a test method using a String. Under the hood, it replaces + # spaces with underscores and defines the test method. + # + # test "verify something" do + # ... + # end + # + # source://activesupport//lib/active_support/testing/declarative.rb#13 + def test(name, &block); end +end + +# source://activesupport//lib/active_support/testing/deprecation.rb#7 +module ActiveSupport::Testing::Deprecation + # Asserts that a matching deprecation warning was emitted by the given deprecator during the execution of the yielded block. + # + # assert_deprecated(/foo/, CustomDeprecator) do + # CustomDeprecator.warn "foo should no longer be used" + # end + # + # The +match+ object may be a +Regexp+, or +String+ appearing in the message. + # + # assert_deprecated('foo', CustomDeprecator) do + # CustomDeprecator.warn "foo should no longer be used" + # end + # + # If the +match+ is omitted (or explicitly +nil+), any deprecation warning will match. + # + # assert_deprecated(nil, CustomDeprecator) do + # CustomDeprecator.warn "foo should no longer be used" + # end + # + # If no +deprecator+ is given, defaults to ActiveSupport::Deprecation. + # + # assert_deprecated do + # ActiveSupport::Deprecation.warn "foo should no longer be used" + # end + # + # source://activesupport//lib/active_support/testing/deprecation.rb#31 + def assert_deprecated(match = T.unsafe(nil), deprecator = T.unsafe(nil), &block); end + + # Asserts that no deprecation warnings are emitted by the given deprecator during the execution of the yielded block. + # + # assert_not_deprecated(CustomDeprecator) do + # CustomDeprecator.warn "message" # fails assertion + # end + # + # If no +deprecator+ is given, defaults to ActiveSupport::Deprecation. + # + # assert_not_deprecated do + # ActiveSupport::Deprecation.warn "message" # fails assertion + # end + # + # assert_not_deprecated do + # CustomDeprecator.warn "message" # passes assertion + # end + # + # source://activesupport//lib/active_support/testing/deprecation.rb#56 + def assert_not_deprecated(deprecator = T.unsafe(nil), &block); end + + # Returns an array of all the deprecation warnings emitted by the given + # +deprecator+ during the execution of the yielded block. + # + # collect_deprecations(CustomDeprecator) do + # CustomDeprecator.warn "message" + # end # => ["message"] + # + # If no +deprecator+ is given, defaults to ActiveSupport::Deprecation. + # + # collect_deprecations do + # CustomDeprecator.warn "custom message" + # ActiveSupport::Deprecation.warn "message" + # end # => ["message"] + # + # source://activesupport//lib/active_support/testing/deprecation.rb#75 + def collect_deprecations(deprecator = T.unsafe(nil)); end +end + +# Adds simple access to sample files called file fixtures. +# File fixtures are normal files stored in +# ActiveSupport::TestCase.file_fixture_path. +# +# File fixtures are represented as +Pathname+ objects. +# This makes it easy to extract specific information: +# +# file_fixture("example.txt").read # get the file's content +# file_fixture("example.mp3").size # get the file size +# +# source://activesupport//lib/active_support/testing/file_fixtures.rb#16 +module ActiveSupport::Testing::FileFixtures + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + # Returns a +Pathname+ to the fixture file named +fixture_name+. + # + # Raises +ArgumentError+ if +fixture_name+ can't be found. + # + # source://activesupport//lib/active_support/testing/file_fixtures.rb#26 + def file_fixture(fixture_name); end + + module GeneratedClassMethods + def file_fixture_path; end + def file_fixture_path=(value); end + def file_fixture_path?; end + end + + module GeneratedInstanceMethods + def file_fixture_path; end + def file_fixture_path?; end + end +end + +# source://activesupport//lib/active_support/testing/isolation.rb#5 +module ActiveSupport::Testing::Isolation + include ::ActiveSupport::Testing::Isolation::Forking + + # source://activesupport//lib/active_support/testing/isolation.rb#18 + def run; end + + class << self + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/isolation.rb#14 + def forking_env?; end + + # source://activesupport//lib/active_support/testing/isolation.rb#8 + def included(klass); end + end +end + +# source://activesupport//lib/active_support/testing/isolation.rb#26 +module ActiveSupport::Testing::Isolation::Forking + # source://activesupport//lib/active_support/testing/isolation.rb#27 + def run_in_isolation(&blk); end +end + +# source://activesupport//lib/active_support/testing/isolation.rb#63 +module ActiveSupport::Testing::Isolation::Subprocess + # Complicated H4X to get this working in windows / jruby with + # no forking. + # + # source://activesupport//lib/active_support/testing/isolation.rb#68 + def run_in_isolation(&blk); end +end + +# source://activesupport//lib/active_support/testing/isolation.rb#64 +ActiveSupport::Testing::Isolation::Subprocess::ORIG_ARGV = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/testing/parallelization/server.rb#8 +class ActiveSupport::Testing::Parallelization + # @return [Parallelization] a new instance of Parallelization + # + # source://activesupport//lib/active_support/testing/parallelization.rb#28 + def initialize(worker_count); end + + # source://activesupport//lib/active_support/testing/parallelization.rb#41 + def <<(work); end + + # source://activesupport//lib/active_support/testing/parallelization.rb#18 + def after_fork_hooks; end + + # source://activesupport//lib/active_support/testing/parallelization.rb#26 + def run_cleanup_hooks; end + + # source://activesupport//lib/active_support/testing/parallelization.rb#49 + def shutdown; end + + # source://activesupport//lib/active_support/testing/parallelization.rb#45 + def size; end + + # source://activesupport//lib/active_support/testing/parallelization.rb#35 + def start; end + + class << self + # source://activesupport//lib/active_support/testing/parallelization.rb#14 + def after_fork_hook(&blk); end + + # source://activesupport//lib/active_support/testing/parallelization.rb#18 + def after_fork_hooks; end + + # source://activesupport//lib/active_support/testing/parallelization.rb#22 + def run_cleanup_hook(&blk); end + + # source://activesupport//lib/active_support/testing/parallelization.rb#26 + def run_cleanup_hooks; end + end +end + +# source://activesupport//lib/active_support/testing/parallelization/server.rb#9 +class ActiveSupport::Testing::Parallelization::Server + include ::DRb::DRbUndumped + + # @return [Server] a new instance of Server + # + # source://activesupport//lib/active_support/testing/parallelization/server.rb#12 + def initialize; end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#28 + def <<(o); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/parallelization/server.rb#48 + def active_workers?; end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#52 + def interrupt; end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#33 + def pop; end + + # @raise [DRb::DRbConnError] + # + # source://activesupport//lib/active_support/testing/parallelization/server.rb#18 + def record(reporter, result); end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#56 + def shutdown; end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#40 + def start_worker(worker_id); end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#44 + def stop_worker(worker_id); end +end + +# source://activesupport//lib/active_support/testing/parallelization/worker.rb#6 +class ActiveSupport::Testing::Parallelization::Worker + # @return [Worker] a new instance of Worker + # + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#7 + def initialize(number, url); end + + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#80 + def after_fork; end + + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#42 + def perform_job(job); end + + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#86 + def run_cleanup; end + + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#56 + def safe_record(reporter, result); end + + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#14 + def start; end + + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#36 + def work_from_queue; end + + private + + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#93 + def add_setup_exception(result); end + + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#97 + def set_process_title(status); end +end + +# source://activesupport//lib/active_support/testing/parallelize_executor.rb#5 +class ActiveSupport::Testing::ParallelizeExecutor + # @return [ParallelizeExecutor] a new instance of ParallelizeExecutor + # + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#8 + def initialize(size:, with:, threshold: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#21 + def <<(work); end + + # Returns the value of attribute parallelize_with. + # + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#6 + def parallelize_with; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#25 + def shutdown; end + + # Returns the value of attribute size. + # + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#6 + def size; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#14 + def start; end + + # Returns the value of attribute threshold. + # + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#6 + def threshold; end + + private + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#34 + def build_parallel_executor; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#67 + def execution_info; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#30 + def parallel_executor; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#46 + def parallelize; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#51 + def parallelized?; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#55 + def should_parallelize?; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#63 + def show_execution_info; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#59 + def tests_count; end +end + +# Adds support for +setup+ and +teardown+ callbacks. +# These callbacks serve as a replacement to overwriting the +# #setup and #teardown methods of your TestCase. +# +# class ExampleTest < ActiveSupport::TestCase +# setup do +# # ... +# end +# +# teardown do +# # ... +# end +# end +# +# source://activesupport//lib/active_support/testing/setup_and_teardown.rb#20 +module ActiveSupport::Testing::SetupAndTeardown + # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#44 + def after_teardown; end + + # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#39 + def before_setup; end + + class << self + # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#21 + def prepended(klass); end + end +end + +# source://activesupport//lib/active_support/testing/setup_and_teardown.rb#27 +module ActiveSupport::Testing::SetupAndTeardown::ClassMethods + # Add a callback, which runs before TestCase#setup. + # + # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#29 + def setup(*args, &block); end + + # Add a callback, which runs after TestCase#teardown. + # + # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#34 + def teardown(*args, &block); end +end + +# Manages stubs for TimeHelpers +# +# source://activesupport//lib/active_support/testing/time_helpers.rb#10 +class ActiveSupport::Testing::SimpleStubs + # @return [SimpleStubs] a new instance of SimpleStubs + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#13 + def initialize; end + + # Stubs object.method_name with the given block + # If the method is already stubbed, remove that stub + # so that removing this stub will restore the original implementation. + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # target = Time.zone.local(2004, 11, 24, 1, 4, 44) + # simple_stubs.stub_object(Time, :now) { at(target.to_i) } + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#24 + def stub_object(object, method_name, &block); end + + # Returns true if any stubs are set, false if there are none + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#54 + def stubbed?; end + + # Returns the Stub for object#method_name + # (nil if it is not stubbed) + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#49 + def stubbing(object, method_name); end + + # Remove all object-method stubs held by this instance + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#38 + def unstub_all!; end + + private + + # Restores the original object.method described by the Stub + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#60 + def unstub_object(stub); end +end + +# source://activesupport//lib/active_support/testing/time_helpers.rb#11 +class ActiveSupport::Testing::SimpleStubs::Stub < ::Struct + # Returns the value of attribute method_name + # + # @return [Object] the current value of method_name + def method_name; end + + # Sets the attribute method_name + # + # @param value [Object] the value to set the attribute method_name to. + # @return [Object] the newly set value + def method_name=(_); end + + # Returns the value of attribute object + # + # @return [Object] the current value of object + def object; end + + # Sets the attribute object + # + # @param value [Object] the value to set the attribute object to. + # @return [Object] the newly set value + def object=(_); end + + # Returns the value of attribute original_method + # + # @return [Object] the current value of original_method + def original_method; end + + # Sets the attribute original_method + # + # @param value [Object] the value to set the attribute original_method to. + # @return [Object] the newly set value + def original_method=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Logs a "PostsControllerTest: test name" heading before each test to +# make test.log easier to search and follow along with. +# +# source://activesupport//lib/active_support/testing/tagged_logging.rb#7 +module ActiveSupport::Testing::TaggedLogging + # source://activesupport//lib/active_support/testing/tagged_logging.rb#10 + def before_setup; end + + # source://activesupport//lib/active_support/testing/tagged_logging.rb#8 + def tagged_logger=(_arg0); end + + private + + # source://activesupport//lib/active_support/testing/tagged_logging.rb#22 + def tagged_logger; end +end + +# Contains helpers that help you test passage of time. +# +# source://activesupport//lib/active_support/testing/time_helpers.rb#69 +module ActiveSupport::Testing::TimeHelpers + # source://activesupport//lib/active_support/testing/time_helpers.rb#70 + def after_teardown; end + + # Calls +travel_to+ with +Time.now+. + # + # Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00 + # freeze_time + # sleep(1) + # Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00 + # + # This method also accepts a block, which will return the current time back to its original + # state at the end of the block: + # + # Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00 + # freeze_time do + # sleep(1) + # User.create.created_at # => Sun, 09 Jul 2017 15:34:49 EST -05:00 + # end + # Time.current # => Sun, 09 Jul 2017 15:34:50 EST -05:00 + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#234 + def freeze_time(&block); end + + # Changes current time to the time in the future or in the past by a given time difference by + # stubbing +Time.now+, +Date.today+, and +DateTime.now+. The stubs are automatically removed + # at the end of the test. + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # travel 1.day + # Time.current # => Sun, 10 Nov 2013 15:34:49 EST -05:00 + # Date.current # => Sun, 10 Nov 2013 + # DateTime.current # => Sun, 10 Nov 2013 15:34:49 -0500 + # + # This method also accepts a block, which will return the current time back to its original + # state at the end of the block: + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # travel 1.day do + # User.create.created_at # => Sun, 10 Nov 2013 15:34:49 EST -05:00 + # end + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#93 + def travel(duration, &block); end + + # Returns the current time back to its original state, by removing the stubs added by + # +travel+, +travel_to+, and +freeze_time+. + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # travel_back + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # This method also accepts a block, which brings the stubs back at the end of the block: + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # travel_back do + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # end + # + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#208 + def travel_back; end + + # Changes current time to the given time by stubbing +Time.now+, + # +Date.today+, and +DateTime.now+ to return the time or date passed into this method. + # The stubs are automatically removed at the end of the test. + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # Date.current # => Wed, 24 Nov 2004 + # DateTime.current # => Wed, 24 Nov 2004 01:04:44 -0500 + # + # Dates are taken as their timestamp at the beginning of the day in the + # application time zone. Time.current returns said timestamp, + # and Time.now its equivalent in the system time zone. Similarly, + # Date.current returns a date equal to the argument, and + # Date.today the date according to Time.now, which may + # be different. (Note that you rarely want to deal with Time.now, + # or Date.today, in order to honor the application time zone + # please always use Time.current and Date.current.) + # + # Note that the usec for the time passed will be set to 0 to prevent rounding + # errors with external services, like MySQL (which will round instead of floor, + # leading to off-by-one-second errors). + # + # This method also accepts a block, which will return the current time back to its original + # state at the end of the block: + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) do + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # end + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#128 + def travel_to(date_or_time); end + + # Returns the current time back to its original state, by removing the stubs added by + # +travel+, +travel_to+, and +freeze_time+. + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # travel_back + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # This method also accepts a block, which brings the stubs back at the end of the block: + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # travel_back do + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # end + # + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#208 + def unfreeze_time; end + + private + + # Returns the value of attribute in_block. + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#243 + def in_block; end + + # Sets the attribute in_block + # + # @param value the value to set the attribute in_block to. + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#243 + def in_block=(_arg0); end + + # source://activesupport//lib/active_support/testing/time_helpers.rb#239 + def simple_stubs; end +end + +# A Time-like class that can represent a time in any time zone. Necessary +# because standard Ruby Time instances are limited to UTC and the +# system's ENV['TZ'] zone. +# +# You shouldn't ever need to create a TimeWithZone instance directly via +new+. +# Instead use methods +local+, +parse+, +at+, and +now+ on TimeZone instances, +# and +in_time_zone+ on Time and DateTime instances. +# +# Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' +# Time.zone.local(2007, 2, 10, 15, 30, 45) # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 +# Time.zone.parse('2007-02-10 15:30:45') # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 +# Time.zone.at(1171139445) # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 +# Time.zone.now # => Sun, 18 May 2008 13:07:55.754107581 EDT -04:00 +# Time.utc(2007, 2, 10, 20, 30, 45).in_time_zone # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 +# +# See Time and TimeZone for further documentation of these methods. +# +# TimeWithZone instances implement the same API as Ruby Time instances, so +# that Time and TimeWithZone instances are interchangeable. +# +# t = Time.zone.now # => Sun, 18 May 2008 13:27:25.031505668 EDT -04:00 +# t.hour # => 13 +# t.dst? # => true +# t.utc_offset # => -14400 +# t.zone # => "EDT" +# t.to_fs(:rfc822) # => "Sun, 18 May 2008 13:27:25 -0400" +# t + 1.day # => Mon, 19 May 2008 13:27:25.031505668 EDT -04:00 +# t.beginning_of_year # => Tue, 01 Jan 2008 00:00:00.000000000 EST -05:00 +# t > Time.utc(1999) # => true +# t.is_a?(Time) # => true +# t.is_a?(ActiveSupport::TimeWithZone) # => true +# +# source://activesupport//lib/active_support/time_with_zone.rb#42 +class ActiveSupport::TimeWithZone + include ::DateAndTime::Compatibility + include ::Comparable + + # @return [TimeWithZone] a new instance of TimeWithZone + # + # source://activesupport//lib/active_support/time_with_zone.rb#61 + def initialize(utc_time, time_zone, local_time = T.unsafe(nil), period = T.unsafe(nil)); end + + # Adds an interval of time to the current object's time and returns that + # value as a new TimeWithZone object. + # + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 + # now + 1000 # => Sun, 02 Nov 2014 01:43:08.725182881 EDT -04:00 + # + # If we're adding a Duration of variable length (i.e., years, months, days), + # move forward from #time, otherwise move forward from #utc, for accuracy + # when moving across DST boundaries. + # + # For instance, a time + 24.hours will advance exactly 24 hours, while a + # time + 1.day will advance 23-25 hours, depending on the day. + # + # now + 24.hours # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 + # now + 1.day # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00 + # + # source://activesupport//lib/active_support/time_with_zone.rb#328 + def +(other); end + + # Subtracts an interval of time and returns a new TimeWithZone object unless + # the other value +acts_like?+ time. In which case, it will subtract the + # other time and return the difference in seconds as a Float. + # + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # now = Time.zone.now # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 + # now - 1000 # => Mon, 03 Nov 2014 00:09:48.725182881 EST -05:00 + # + # If subtracting a Duration of variable length (i.e., years, months, days), + # move backward from #time, otherwise move backward from #utc, for accuracy + # when moving across DST boundaries. + # + # For instance, a time - 24.hours will go subtract exactly 24 hours, while a + # time - 1.day will subtract 23-25 hours, depending on the day. + # + # now - 24.hours # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 + # now - 1.day # => Sun, 02 Nov 2014 00:26:28.725182881 EDT -04:00 + # + # If both the TimeWithZone object and the other value act like Time, a Float + # will be returned. + # + # Time.zone.now - 1.day.ago # => 86399.999967 + # + # source://activesupport//lib/active_support/time_with_zone.rb#362 + def -(other); end + + # Use the time in UTC for comparisons. + # + # source://activesupport//lib/active_support/time_with_zone.rb#261 + def <=>(other); end + + # So that +self+ acts_like?(:time). + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#523 + def acts_like_time?; end + + # Uses Date to provide precise Time calculations for years, months, and days + # according to the proleptic Gregorian calendar. The result is returned as a + # new TimeWithZone object. + # + # The +options+ parameter takes a hash with any of these keys: + # :years, :months, :weeks, :days, + # :hours, :minutes, :seconds. + # + # If advancing by a value of variable length (i.e., years, weeks, months, + # days), move forward from #time, otherwise move forward from #utc, for + # accuracy when moving across DST boundaries. + # + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.558049687 EDT -04:00 + # now.advance(seconds: 1) # => Sun, 02 Nov 2014 01:26:29.558049687 EDT -04:00 + # now.advance(minutes: 1) # => Sun, 02 Nov 2014 01:27:28.558049687 EDT -04:00 + # now.advance(hours: 1) # => Sun, 02 Nov 2014 01:26:28.558049687 EST -05:00 + # now.advance(days: 1) # => Mon, 03 Nov 2014 01:26:28.558049687 EST -05:00 + # now.advance(weeks: 1) # => Sun, 09 Nov 2014 01:26:28.558049687 EST -05:00 + # now.advance(months: 1) # => Tue, 02 Dec 2014 01:26:28.558049687 EST -05:00 + # now.advance(years: 1) # => Mon, 02 Nov 2015 01:26:28.558049687 EST -05:00 + # + # source://activesupport//lib/active_support/time_with_zone.rb#451 + def advance(options); end + + def after?(_arg0); end + + # Subtracts an interval of time from the current object's time and returns + # the result as a new TimeWithZone object. + # + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # now = Time.zone.now # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 + # now.ago(1000) # => Mon, 03 Nov 2014 00:09:48.725182881 EST -05:00 + # + # If we're subtracting a Duration of variable length (i.e., years, months, + # days), move backward from #time, otherwise move backward from #utc, for + # accuracy when moving across DST boundaries. + # + # For instance, time.ago(24.hours) will move back exactly 24 hours, + # while time.ago(1.day) will move back 23-25 hours, depending on + # the day. + # + # now.ago(24.hours) # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 + # now.ago(1.day) # => Sun, 02 Nov 2014 00:26:28.725182881 EDT -04:00 + # + # source://activesupport//lib/active_support/time_with_zone.rb#390 + def ago(other); end + + # Coerces time to a string for JSON encoding. The default format is ISO 8601. + # You can get %Y/%m/%d %H:%M:%S +offset style by setting + # ActiveSupport::JSON::Encoding.use_standard_json_time_format + # to +false+. + # + # # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = true + # Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").to_json + # # => "2005-02-01T05:15:10.000-10:00" + # + # # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = false + # Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").to_json + # # => "2005/02/01 05:15:10 -1000" + # + # source://activesupport//lib/active_support/time_with_zone.rb#176 + def as_json(options = T.unsafe(nil)); end + + def before?(_arg0); end + + # Returns true if the current object's time is within the specified + # +min+ and +max+ time. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#269 + def between?(min, max); end + + # An instance of ActiveSupport::TimeWithZone is never blank + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#534 + def blank?; end + + # Returns a new +ActiveSupport::TimeWithZone+ where one or more of the elements have + # been changed according to the +options+ parameter. The time options (:hour, + # :min, :sec, :usec, :nsec) reset cascadingly, + # so if only the hour is passed, then minute, sec, usec, and nsec is set to 0. If the + # hour and minute is passed, then sec, usec, and nsec is set to 0. The +options+ + # parameter takes a hash with any of these keys: :year, :month, + # :day, :hour, :min, :sec, :usec, + # :nsec, :offset, :zone. Pass either :usec + # or :nsec, not both. Similarly, pass either :zone or + # :offset, not both. + # + # t = Time.zone.now # => Fri, 14 Apr 2017 11:45:15.116992711 EST -05:00 + # t.change(year: 2020) # => Tue, 14 Apr 2020 11:45:15.116992711 EST -05:00 + # t.change(hour: 12) # => Fri, 14 Apr 2017 12:00:00.116992711 EST -05:00 + # t.change(min: 30) # => Fri, 14 Apr 2017 11:30:00.116992711 EST -05:00 + # t.change(offset: "-10:00") # => Fri, 14 Apr 2017 11:45:15.116992711 HST -10:00 + # t.change(zone: "Hawaii") # => Fri, 14 Apr 2017 11:45:15.116992711 HST -10:00 + # + # source://activesupport//lib/active_support/time_with_zone.rb#411 + def change(options); end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#73 + def comparable_time; end + + # source://activesupport//lib/active_support/time_with_zone.rb#463 + def day; end + + # Returns true if the current time is within Daylight Savings Time for the + # specified time zone. + # + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # Time.zone.parse("2012-5-30").dst? # => true + # Time.zone.parse("2012-11-30").dst? # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#104 + def dst?; end + + # source://activesupport//lib/active_support/time_with_zone.rb#188 + def encode_with(coder); end + + # Returns +true+ if +other+ is equal to current object. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#304 + def eql?(other); end + + # Returns a formatted string of the offset from UTC, or an alternative + # string if the time zone is already UTC. + # + # Time.zone = 'Eastern Time (US & Canada)' # => "Eastern Time (US & Canada)" + # Time.zone.now.formatted_offset(true) # => "-05:00" + # Time.zone.now.formatted_offset(false) # => "-0500" + # Time.zone = 'UTC' # => "UTC" + # Time.zone.now.formatted_offset(true, "0") # => "0" + # + # source://activesupport//lib/active_support/time_with_zone.rb#135 + def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/time_with_zone.rb#538 + def freeze; end + + # Returns true if the current object's time is in the future. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#299 + def future?; end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#73 + def getgm; end + + # Returns a Time instance of the simultaneous time in the system timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#93 + def getlocal(utc_offset = T.unsafe(nil)); end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#73 + def getutc; end + + # Returns true if the current time zone is set to UTC. + # + # Time.zone = 'UTC' # => 'UTC' + # Time.zone.now.utc? # => true + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # Time.zone.now.utc? # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#115 + def gmt?; end + + # Returns the offset from current time to UTC time in seconds. + # + # source://activesupport//lib/active_support/time_with_zone.rb#121 + def gmt_offset; end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#73 + def gmtime; end + + # Returns the offset from current time to UTC time in seconds. + # + # source://activesupport//lib/active_support/time_with_zone.rb#121 + def gmtoff; end + + # source://activesupport//lib/active_support/time_with_zone.rb#308 + def hash; end + + # source://activesupport//lib/active_support/time_with_zone.rb#463 + def hour; end + + # Returns a string of the object's date and time in the format used by + # HTTP requests. + # + # Time.zone.now.httpdate # => "Tue, 01 Jan 2013 04:39:43 GMT" + # + # source://activesupport//lib/active_support/time_with_zone.rb#196 + def httpdate; end + + # Adds an interval of time to the current object's time and returns that + # value as a new TimeWithZone object. + # + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 + # now + 1000 # => Sun, 02 Nov 2014 01:43:08.725182881 EDT -04:00 + # + # If we're adding a Duration of variable length (i.e., years, months, days), + # move forward from #time, otherwise move forward from #utc, for accuracy + # when moving across DST boundaries. + # + # For instance, a time + 24.hours will advance exactly 24 hours, while a + # time + 1.day will advance 23-25 hours, depending on the day. + # + # now + 24.hours # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 + # now + 1.day # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00 + # + # source://activesupport//lib/active_support/time_with_zone.rb#328 + def in(other); end + + # Returns the simultaneous time in Time.zone, or the specified zone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#87 + def in_time_zone(new_zone = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/time_with_zone.rb#184 + def init_with(coder); end + + # Returns a string of the object's date, time, zone, and offset from UTC. + # + # Time.zone.now.inspect # => "Thu, 04 Dec 2014 11:00:25.624541392 EST -05:00" + # + # source://activesupport//lib/active_support/time_with_zone.rb#150 + def inspect; end + + # Say we're a Time to thwart type checking. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#528 + def is_a?(klass); end + + # Returns true if the current time is within Daylight Savings Time for the + # specified time zone. + # + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # Time.zone.parse("2012-5-30").dst? # => true + # Time.zone.parse("2012-11-30").dst? # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#104 + def isdst; end + + # Returns a string of the object's date and time in the ISO 8601 standard + # format. + # + # Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00" + # + # source://activesupport//lib/active_support/time_with_zone.rb#158 + def iso8601(fraction_digits = T.unsafe(nil)); end + + # Say we're a Time to thwart type checking. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#528 + def kind_of?(klass); end + + # Returns a Time instance of the simultaneous time in the system timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#93 + def localtime(utc_offset = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/time_with_zone.rb#544 + def marshal_dump; end + + # source://activesupport//lib/active_support/time_with_zone.rb#548 + def marshal_load(variables); end + + # source://activesupport//lib/active_support/time_with_zone.rb#463 + def mday; end + + # Send the missing method to +time+ instance, and wrap result in a new + # TimeWithZone with the existing +time_zone+. + # + # source://activesupport//lib/active_support/time_with_zone.rb#569 + def method_missing(sym, *args, &block); end + + # source://activesupport//lib/active_support/time_with_zone.rb#463 + def min; end + + # source://activesupport//lib/active_support/time_with_zone.rb#463 + def mon; end + + # source://activesupport//lib/active_support/time_with_zone.rb#463 + def month; end + + # Returns true if the current object's time falls within + # the next day (tomorrow). + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#286 + def next_day?; end + + # source://activesupport//lib/active_support/time_with_zone.rb#463 + def nsec; end + + # Returns true if the current object's time is in the past. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#274 + def past?; end + + # Returns the underlying TZInfo::TimezonePeriod. + # + # source://activesupport//lib/active_support/time_with_zone.rb#82 + def period; end + + # Returns true if the current object's time falls within + # the previous day (yesterday). + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#293 + def prev_day?; end + + # respond_to_missing? is not called in some cases, such as when type conversion is + # performed with Kernel#String + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#554 + def respond_to?(sym, include_priv = T.unsafe(nil)); end + + # Returns a string of the object's date and time in the RFC 2822 standard + # format. + # + # Time.zone.now.rfc2822 # => "Tue, 01 Jan 2013 04:51:39 +0000" + # + # source://activesupport//lib/active_support/time_with_zone.rb#204 + def rfc2822; end + + # Returns a string of the object's date and time in the ISO 8601 standard + # format. + # + # Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00" + # + # source://activesupport//lib/active_support/time_with_zone.rb#158 + def rfc3339(fraction_digits = T.unsafe(nil)); end + + # Returns a string of the object's date and time in the RFC 2822 standard + # format. + # + # Time.zone.now.rfc2822 # => "Tue, 01 Jan 2013 04:51:39 +0000" + # + # source://activesupport//lib/active_support/time_with_zone.rb#204 + def rfc822; end + + # source://activesupport//lib/active_support/time_with_zone.rb#463 + def sec; end + + # Adds an interval of time to the current object's time and returns that + # value as a new TimeWithZone object. + # + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 + # now + 1000 # => Sun, 02 Nov 2014 01:43:08.725182881 EDT -04:00 + # + # If we're adding a Duration of variable length (i.e., years, months, days), + # move forward from #time, otherwise move forward from #utc, for accuracy + # when moving across DST boundaries. + # + # For instance, a time + 24.hours will advance exactly 24 hours, while a + # time + 1.day will advance 23-25 hours, depending on the day. + # + # now + 24.hours # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 + # now + 1.day # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00 + # + # source://activesupport//lib/active_support/time_with_zone.rb#328 + def since(other); end + + # Replaces %Z directive with +zone before passing to Time#strftime, + # so that zone information is correct. + # + # source://activesupport//lib/active_support/time_with_zone.rb#255 + def strftime(format); end + + # Returns a Time instance that represents the time in +time_zone+. + # + # source://activesupport//lib/active_support/time_with_zone.rb#68 + def time; end + + # Returns the value of attribute time_zone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#59 + def time_zone; end + + # Returns Array of parts of Time in sequence of + # [seconds, minutes, hours, day, month, year, weekday, yearday, dst?, zone]. + # + # now = Time.zone.now # => Tue, 18 Aug 2015 02:29:27.485278555 UTC +00:00 + # now.to_a # => [27, 29, 2, 18, 8, 2015, 2, 230, false, "UTC"] + # + # source://activesupport//lib/active_support/time_with_zone.rb#474 + def to_a; end + + # source://activesupport//lib/active_support/time_with_zone.rb#463 + def to_date; end + + # Returns an instance of DateTime with the timezone's UTC offset + # + # Time.zone.now.to_datetime # => Tue, 18 Aug 2015 02:32:20 +0000 + # Time.current.in_time_zone('Hawaii').to_datetime # => Mon, 17 Aug 2015 16:32:20 -1000 + # + # source://activesupport//lib/active_support/time_with_zone.rb#507 + def to_datetime; end + + # Returns the object's date and time as a floating-point number of seconds + # since the Epoch (January 1, 1970 00:00 UTC). + # + # Time.zone.now.to_f # => 1417709320.285418 + # + # source://activesupport//lib/active_support/time_with_zone.rb#482 + def to_f; end + + # Returns a string of the object's date and time. + # + # This method is aliased to to_formatted_s. + # + # Accepts an optional format: + # * :default - default value, mimics Ruby Time#to_s format. + # * :db - format outputs time in UTC :db time. See Time#to_fs(:db). + # * Any key in Time::DATE_FORMATS can be used. See active_support/core_ext/time/conversions.rb. + # + # source://activesupport//lib/active_support/time_with_zone.rb#241 + def to_formatted_s(format = T.unsafe(nil)); end + + # Returns a string of the object's date and time. + # + # This method is aliased to to_formatted_s. + # + # Accepts an optional format: + # * :default - default value, mimics Ruby Time#to_s format. + # * :db - format outputs time in UTC :db time. See Time#to_fs(:db). + # * Any key in Time::DATE_FORMATS can be used. See active_support/core_ext/time/conversions.rb. + # + # source://activesupport//lib/active_support/time_with_zone.rb#241 + def to_fs(format = T.unsafe(nil)); end + + # Returns the object's date and time as an integer number of seconds + # since the Epoch (January 1, 1970 00:00 UTC). + # + # Time.zone.now.to_i # => 1417709320 + # + # source://activesupport//lib/active_support/time_with_zone.rb#490 + def to_i; end + + # Returns the object's date and time as a rational number of seconds + # since the Epoch (January 1, 1970 00:00 UTC). + # + # Time.zone.now.to_r # => (708854548642709/500000) + # + # source://activesupport//lib/active_support/time_with_zone.rb#499 + def to_r; end + + # Returns a string of the object's date and time. + # + # source://activesupport//lib/active_support/time_with_zone.rb#212 + def to_s(format = T.unsafe(nil)); end + + # Returns an instance of +Time+, either with the same UTC offset + # as +self+ or in the local system timezone depending on the setting + # of +ActiveSupport.to_time_preserves_timezone+. + # + # source://activesupport//lib/active_support/time_with_zone.rb#514 + def to_time; end + + # Returns true if the current object's time falls within + # the current day. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#280 + def today?; end + + # Returns true if the current object's time falls within + # the next day (tomorrow). + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#286 + def tomorrow?; end + + # Returns the object's date and time as an integer number of seconds + # since the Epoch (January 1, 1970 00:00 UTC). + # + # Time.zone.now.to_i # => 1417709320 + # + # source://activesupport//lib/active_support/time_with_zone.rb#490 + def tv_sec; end + + # source://activesupport//lib/active_support/time_with_zone.rb#463 + def usec; end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#73 + def utc; end + + # Returns true if the current time zone is set to UTC. + # + # Time.zone = 'UTC' # => 'UTC' + # Time.zone.now.utc? # => true + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # Time.zone.now.utc? # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#115 + def utc?; end + + # Returns the offset from current time to UTC time in seconds. + # + # source://activesupport//lib/active_support/time_with_zone.rb#121 + def utc_offset; end + + # source://activesupport//lib/active_support/time_with_zone.rb#463 + def wday; end + + # Returns a string of the object's date and time in the ISO 8601 standard + # format. + # + # Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00" + # + # source://activesupport//lib/active_support/time_with_zone.rb#158 + def xmlschema(fraction_digits = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/time_with_zone.rb#463 + def yday; end + + # source://activesupport//lib/active_support/time_with_zone.rb#463 + def year; end + + # Returns true if the current object's time falls within + # the previous day (yesterday). + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#293 + def yesterday?; end + + # Returns the time zone abbreviation. + # + # Time.zone = 'Eastern Time (US & Canada)' # => "Eastern Time (US & Canada)" + # Time.zone.now.zone # => "EST" + # + # source://activesupport//lib/active_support/time_with_zone.rb#143 + def zone; end + + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#605 + def duration_of_variable_length?(obj); end + + # source://activesupport//lib/active_support/time_with_zone.rb#586 + def get_period_and_ensure_valid_local_time(period); end + + # source://activesupport//lib/active_support/time_with_zone.rb#578 + def incorporate_utc_offset(time, offset); end + + # Ensure proxy class responds to all methods that underlying time instance + # responds to. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#562 + def respond_to_missing?(sym, include_priv); end + + # source://activesupport//lib/active_support/time_with_zone.rb#599 + def transfer_time_values_to_utc_constructor(time); end + + # source://activesupport//lib/active_support/time_with_zone.rb#609 + def wrap_with_time_zone(time); end + + class << self + # Report class name as 'Time' to thwart type checking. + # + # source://activesupport//lib/active_support/time_with_zone.rb#44 + def name; end + end +end + +# source://activesupport//lib/active_support/time_with_zone.rb#209 +ActiveSupport::TimeWithZone::NOT_SET = T.let(T.unsafe(nil), Object) + +# source://activesupport//lib/active_support/time_with_zone.rb#55 +ActiveSupport::TimeWithZone::PRECISIONS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/time_with_zone.rb#576 +ActiveSupport::TimeWithZone::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) + +# The TimeZone class serves as a wrapper around TZInfo::Timezone instances. +# It allows us to do the following: +# +# * Limit the set of zones provided by TZInfo to a meaningful subset of 134 +# zones. +# * Retrieve and display zones with a friendlier name +# (e.g., "Eastern Time (US & Canada)" instead of "America/New_York"). +# * Lazily load TZInfo::Timezone instances only when they're needed. +# * Create ActiveSupport::TimeWithZone instances via TimeZone's +local+, +# +parse+, +at+, and +now+ methods. +# +# If you set config.time_zone in the Rails Application, you can +# access this TimeZone object via Time.zone: +# +# # application.rb: +# class Application < Rails::Application +# config.time_zone = 'Eastern Time (US & Canada)' +# end +# +# Time.zone # => # +# Time.zone.name # => "Eastern Time (US & Canada)" +# Time.zone.now # => Sun, 18 May 2008 14:30:44 EDT -04:00 +# +# source://activesupport//lib/active_support/values/time_zone.rb#29 +class ActiveSupport::TimeZone + include ::Comparable + + # Create a new TimeZone object with the given name and offset. The + # offset is the number of seconds that this time zone is offset from UTC + # (GMT). Seconds were chosen as the offset unit because that is the unit + # that Ruby uses to represent time zone offsets (see Time#utc_offset). + # + # @return [TimeZone] a new instance of TimeZone + # + # source://activesupport//lib/active_support/values/time_zone.rb#301 + def initialize(name, utc_offset = T.unsafe(nil), tzinfo = T.unsafe(nil)); end + + # Compare this time zone to the parameter. The two are compared first on + # their offsets, and then by name. + # + # source://activesupport//lib/active_support/values/time_zone.rb#324 + def <=>(zone); end + + # Compare #name and TZInfo identifier to a supplied regexp, returning +true+ + # if a match is found. + # + # source://activesupport//lib/active_support/values/time_zone.rb#333 + def =~(re); end + + # Method for creating new ActiveSupport::TimeWithZone instance in time zone + # of +self+ from number of seconds since the Unix epoch. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.utc(2000).to_f # => 946684800.0 + # Time.zone.at(946684800.0) # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # + # A second argument can be supplied to specify sub-second precision. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.at(946684800, 123456.789).nsec # => 123456789 + # + # source://activesupport//lib/active_support/values/time_zone.rb#370 + def at(*args); end + + # source://activesupport//lib/active_support/values/time_zone.rb#566 + def encode_with(coder); end + + # Returns a formatted string of the offset from UTC, or an alternative + # string if the time zone is already UTC. + # + # zone = ActiveSupport::TimeZone['Central Time (US & Canada)'] + # zone.formatted_offset # => "-06:00" + # zone.formatted_offset(false) # => "-0600" + # + # source://activesupport//lib/active_support/values/time_zone.rb#318 + def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/values/time_zone.rb#562 + def init_with(coder); end + + # Method for creating new ActiveSupport::TimeWithZone instance in time zone + # of +self+ from an ISO 8601 string. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.iso8601('1999-12-31T14:00:00') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # + # If the time components are missing then they will be set to zero. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.iso8601('1999-12-31') # => Fri, 31 Dec 1999 00:00:00 HST -10:00 + # + # If the string is invalid then an +ArgumentError+ will be raised unlike +parse+ + # which usually returns +nil+ when given an invalid date string. + # + # source://activesupport//lib/active_support/values/time_zone.rb#387 + def iso8601(str); end + + # Method for creating new ActiveSupport::TimeWithZone instance in time zone + # of +self+ from given values. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.local(2007, 2, 1, 15, 30, 45) # => Thu, 01 Feb 2007 15:30:45 HST -10:00 + # + # source://activesupport//lib/active_support/values/time_zone.rb#354 + def local(*args); end + + # Adjust the given time to the simultaneous time in UTC. Returns a + # Time.utc() instance. + # + # source://activesupport//lib/active_support/values/time_zone.rb#542 + def local_to_utc(time, dst = T.unsafe(nil)); end + + # Compare #name and TZInfo identifier to a supplied regexp, returning +true+ + # if a match is found. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/values/time_zone.rb#339 + def match?(re); end + + # Returns the value of attribute name. + # + # source://activesupport//lib/active_support/values/time_zone.rb#294 + def name; end + + # Returns an ActiveSupport::TimeWithZone instance representing the current + # time in the time zone represented by +self+. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.now # => Wed, 23 Jan 2008 20:24:27 HST -10:00 + # + # source://activesupport//lib/active_support/values/time_zone.rb#507 + def now; end + + # Method for creating new ActiveSupport::TimeWithZone instance in time zone + # of +self+ from parsed string. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.parse('1999-12-31 14:00:00') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # + # If upper components are missing from the string, they are supplied from + # TimeZone#now: + # + # Time.zone.now # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # Time.zone.parse('22:30:00') # => Fri, 31 Dec 1999 22:30:00 HST -10:00 + # + # However, if the date component is not provided, but any other upper + # components are supplied, then the day of the month defaults to 1: + # + # Time.zone.parse('Mar 2000') # => Wed, 01 Mar 2000 00:00:00 HST -10:00 + # + # If the string is invalid then an +ArgumentError+ could be raised. + # + # source://activesupport//lib/active_support/values/time_zone.rb#444 + def parse(str, now = T.unsafe(nil)); end + + # Available so that TimeZone instances respond like TZInfo::Timezone + # instances. + # + # source://activesupport//lib/active_support/values/time_zone.rb#554 + def period_for_local(time, dst = T.unsafe(nil)); end + + # Available so that TimeZone instances respond like TZInfo::Timezone + # instances. + # + # source://activesupport//lib/active_support/values/time_zone.rb#548 + def period_for_utc(time); end + + # source://activesupport//lib/active_support/values/time_zone.rb#558 + def periods_for_local(time); end + + # Method for creating new ActiveSupport::TimeWithZone instance in time zone + # of +self+ from an RFC 3339 string. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.rfc3339('2000-01-01T00:00:00Z') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # + # If the time or zone components are missing then an +ArgumentError+ will + # be raised. This is much stricter than either +parse+ or +iso8601+ which + # allow for missing components. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.rfc3339('1999-12-31') # => ArgumentError: invalid date + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/values/time_zone.rb#460 + def rfc3339(str); end + + # Parses +str+ according to +format+ and returns an ActiveSupport::TimeWithZone. + # + # Assumes that +str+ is a time in the time zone +self+, + # unless +format+ includes an explicit time zone. + # (This is the same behavior as +parse+.) + # In either case, the returned TimeWithZone has the timezone of +self+. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.strptime('1999-12-31 14:00:00', '%Y-%m-%d %H:%M:%S') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # + # If upper components are missing from the string, they are supplied from + # TimeZone#now: + # + # Time.zone.now # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # Time.zone.strptime('22:30:00', '%H:%M:%S') # => Fri, 31 Dec 1999 22:30:00 HST -10:00 + # + # However, if the date component is not provided, but any other upper + # components are supplied, then the day of the month defaults to 1: + # + # Time.zone.strptime('Mar 2000', '%b %Y') # => Wed, 01 Mar 2000 00:00:00 HST -10:00 + # + # source://activesupport//lib/active_support/values/time_zone.rb#498 + def strptime(str, format, now = T.unsafe(nil)); end + + # Returns a textual representation of this time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#345 + def to_s; end + + # Returns the current date in this time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#512 + def today; end + + # Returns the next date in this time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#517 + def tomorrow; end + + # Returns the value of attribute tzinfo. + # + # source://activesupport//lib/active_support/values/time_zone.rb#295 + def tzinfo; end + + # Returns the offset of this time zone from UTC in seconds. + # + # source://activesupport//lib/active_support/values/time_zone.rb#308 + def utc_offset; end + + # Adjust the given time to the simultaneous time in the time zone + # represented by +self+. Returns a local time with the appropriate offset + # -- if you want an ActiveSupport::TimeWithZone instance, use + # Time#in_time_zone() instead. + # + # As of tzinfo 2, utc_to_local returns a Time with a non-zero utc_offset. + # See the +utc_to_local_returns_utc_offset_times+ config for more info. + # + # source://activesupport//lib/active_support/values/time_zone.rb#533 + def utc_to_local(time); end + + # Returns the previous date in this time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#522 + def yesterday; end + + private + + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/values/time_zone.rb#572 + def parts_to_time(parts, now); end + + # source://activesupport//lib/active_support/values/time_zone.rb#597 + def time_now; end + + class << self + # Locate a specific time zone object. If the argument is a string, it + # is interpreted to mean the name of the timezone to locate. If it is a + # numeric value it is either the hour offset, or the second offset, of the + # timezone to find. (The first one with that offset will be returned.) + # Returns +nil+ if no such time zone is known to the system. + # + # source://activesupport//lib/active_support/values/time_zone.rb#230 + def [](arg); end + + # Returns an array of all TimeZone objects. There are multiple + # TimeZone objects per time zone, in many cases, to make it easier + # for users to find their own time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#221 + def all; end + + # source://activesupport//lib/active_support/values/time_zone.rb#263 + def clear; end + + # A convenience method for returning a collection of TimeZone objects + # for time zones in the country specified by its ISO 3166-1 Alpha2 code. + # + # source://activesupport//lib/active_support/values/time_zone.rb#258 + def country_zones(country_code); end + + def create(*_arg0); end + + # source://activesupport//lib/active_support/values/time_zone.rb#205 + def find_tzinfo(name); end + + # Returns a TimeZone instance with the given name, or +nil+ if no + # such TimeZone instance exists. (This exists to support the use of + # this class with the +composed_of+ macro.) + # + # source://activesupport//lib/active_support/values/time_zone.rb#214 + def new(name); end + + # Assumes self represents an offset from UTC in seconds (as returned from + # Time#utc_offset) and turns this into an +HH:MM formatted string. + # + # ActiveSupport::TimeZone.seconds_to_utc_offset(-21_600) # => "-06:00" + # + # source://activesupport//lib/active_support/values/time_zone.rb#197 + def seconds_to_utc_offset(seconds, colon = T.unsafe(nil)); end + + # A convenience method for returning a collection of TimeZone objects + # for time zones in the USA. + # + # source://activesupport//lib/active_support/values/time_zone.rb#252 + def us_zones; end + + private + + # source://activesupport//lib/active_support/values/time_zone.rb#271 + def load_country_zones(code); end + + # source://activesupport//lib/active_support/values/time_zone.rb#285 + def zones_map; end + end +end + +# Keys are Rails TimeZone names, values are TZInfo identifiers. +# +# source://activesupport//lib/active_support/values/time_zone.rb#31 +ActiveSupport::TimeZone::MAPPING = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/values/time_zone.rb#186 +ActiveSupport::TimeZone::UTC_OFFSET_WITHOUT_COLON = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/values/time_zone.rb#185 +ActiveSupport::TimeZone::UTC_OFFSET_WITH_COLON = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/core_ext/object/json.rb#35 +module ActiveSupport::ToJsonWithActiveSupportEncoder + # source://activesupport//lib/active_support/core_ext/object/json.rb#36 + def to_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/try.rb#6 +module ActiveSupport::Tryable + # source://activesupport//lib/active_support/core_ext/object/try.rb#7 + def try(*args, **_arg1, &block); end + + # source://activesupport//lib/active_support/core_ext/object/try.rb#20 + def try!(*args, **_arg1, &block); end +end + +# source://activesupport//lib/active_support/gem_version.rb#9 +module ActiveSupport::VERSION; end + +# source://activesupport//lib/active_support/gem_version.rb#10 +ActiveSupport::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/gem_version.rb#11 +ActiveSupport::VERSION::MINOR = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/gem_version.rb#13 +ActiveSupport::VERSION::PRE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/gem_version.rb#15 +ActiveSupport::VERSION::STRING = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/gem_version.rb#12 +ActiveSupport::VERSION::TINY = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/hash/conversions.rb#140 +class ActiveSupport::XMLConverter + # @return [XMLConverter] a new instance of XMLConverter + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#151 + def initialize(xml, disallowed_types = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#156 + def to_h; end + + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#222 + def become_array?(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#218 + def become_content?(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#226 + def become_empty_string?(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#232 + def become_hash?(value); end + + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#172 + def deep_to_h(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#241 + def garbage?(value); end + + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#161 + def normalize_keys(params); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#236 + def nothing?(value); end + + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#257 + def process_array(value); end + + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#248 + def process_content(value); end + + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#185 + def process_hash(value); end +end + +# source://activesupport//lib/active_support/core_ext/hash/conversions.rb#149 +ActiveSupport::XMLConverter::DISALLOWED_TYPES = T.let(T.unsafe(nil), Array) + +# Raised if the XML contains attributes with type="yaml" or +# type="symbol". Read Hash#from_xml for more details. +# +# source://activesupport//lib/active_support/core_ext/hash/conversions.rb#143 +class ActiveSupport::XMLConverter::DisallowedType < ::StandardError + # @return [DisallowedType] a new instance of DisallowedType + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#144 + def initialize(type); end +end + +# = XmlMini +# +# To use the much faster libxml parser: +# gem 'libxml-ruby', '=0.9.7' +# XmlMini.backend = 'LibXML' +# +# source://activesupport//lib/active_support/xml_mini.rb#17 +module ActiveSupport::XmlMini + extend ::ActiveSupport::XmlMini + + # source://activesupport//lib/active_support/xml_mini.rb#97 + def backend; end + + # source://activesupport//lib/active_support/xml_mini.rb#101 + def backend=(name); end + + # Returns the value of attribute depth. + # + # source://activesupport//lib/active_support/xml_mini.rb#92 + def depth; end + + # Sets the attribute depth + # + # @param value the value to set the attribute depth to. + # + # source://activesupport//lib/active_support/xml_mini.rb#92 + def depth=(_arg0); end + + # source://activesupport//lib/active_support/xml_mini.rb#95 + def parse(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/xml_mini.rb#148 + def rename_key(key, options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/xml_mini.rb#115 + def to_tag(key, value, options); end + + # source://activesupport//lib/active_support/xml_mini.rb#107 + def with_backend(name); end + + private + + # source://activesupport//lib/active_support/xml_mini.rb#159 + def _dasherize(key); end + + # TODO: Add support for other encodings + # + # source://activesupport//lib/active_support/xml_mini.rb#166 + def _parse_binary(bin, entity); end + + # source://activesupport//lib/active_support/xml_mini.rb#175 + def _parse_file(file, entity); end + + # source://activesupport//lib/active_support/xml_mini.rb#191 + def cast_backend_name_to_module(name); end + + # source://activesupport//lib/active_support/xml_mini.rb#183 + def current_thread_backend; end + + # source://activesupport//lib/active_support/xml_mini.rb#187 + def current_thread_backend=(name); end +end + +# source://activesupport//lib/active_support/xml_mini.rb#34 +ActiveSupport::XmlMini::DEFAULT_ENCODINGS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/xml_mini.rb#55 +ActiveSupport::XmlMini::FORMATTING = T.let(T.unsafe(nil), Hash) + +# This module decorates files deserialized using Hash.from_xml with +# the original_filename and content_type methods. +# +# source://activesupport//lib/active_support/xml_mini.rb#22 +module ActiveSupport::XmlMini::FileLike + # source://activesupport//lib/active_support/xml_mini.rb#29 + def content_type; end + + # source://activesupport//lib/active_support/xml_mini.rb#23 + def content_type=(_arg0); end + + # source://activesupport//lib/active_support/xml_mini.rb#25 + def original_filename; end + + # source://activesupport//lib/active_support/xml_mini.rb#23 + def original_filename=(_arg0); end +end + +# source://activesupport//lib/active_support/xml_mini.rb#65 +ActiveSupport::XmlMini::PARSING = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/xml_mini.rb#39 +ActiveSupport::XmlMini::TYPE_NAMES = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/xml_mini/rexml.rb#8 +module ActiveSupport::XmlMini_REXML + extend ::ActiveSupport::XmlMini_REXML + + # Parse an XML Document string or IO into a simple hash. + # + # Same as XmlSimple::xml_in but doesn't shoot itself in the foot, + # and uses the defaults from Active Support. + # + # data:: + # XML Document string or IO to parse + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#20 + def parse(data); end + + private + + # Actually converts an XML document element into a data structure. + # + # element:: + # The document element to be collapsed. + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#63 + def collapse(element, depth); end + + # Determines if a document element has text content + # + # element:: + # XML element to be checked. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#133 + def empty_content?(element); end + + # Converts the attributes array of an XML element into a hash. + # Returns an empty Hash if node has no attributes. + # + # element:: + # XML element to extract attributes from. + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#123 + def get_attributes(element); end + + # Adds a new key/value pair to an existing Hash. If the key to be added + # already exists and the existing value associated with key is not + # an Array, it will be wrapped in an Array. Then the new value is + # appended to that Array. + # + # hash:: + # Hash to add key/value pair to. + # key:: + # Key to be added. + # value:: + # Value to be associated with key. + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#103 + def merge!(hash, key, value); end + + # Convert an XML element and merge into the hash + # + # hash:: + # Hash to merge the converted element into. + # element:: + # XML element to merge into hash + # + # @raise [REXML::ParseException] + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#54 + def merge_element!(hash, element, depth); end + + # Merge all the texts of an element into the hash + # + # hash:: + # Hash to add the converted element to. + # element:: + # XML element whose texts are to me merged into the hash + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#81 + def merge_texts!(hash, element); end + + # source://activesupport//lib/active_support/xml_mini/rexml.rb#41 + def require_rexml; end +end + +# source://activesupport//lib/active_support/xml_mini/rexml.rb#11 +ActiveSupport::XmlMini_REXML::CONTENT_KEY = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#83 +class Array + include ::Enumerable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#158 + def as_json(options = T.unsafe(nil)); end + + # Removes all blank elements from the +Array+ in place and returns self. + # Uses Object#blank? for determining if an item is blank. + # + # a = [1, "", nil, 2, " ", [], {}, false, true] + # a.compact_blank! + # # => [1, 2, true] + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#325 + def compact_blank!; end + + # Returns a deep copy of array. + # + # array = [1, [2, 3]] + # dup = array.deep_dup + # dup[1][2] = 4 + # + # array[1][2] # => nil + # dup[1][2] # => 4 + # + # source://activesupport//lib/active_support/core_ext/object/deep_dup.rb#29 + def deep_dup; end + + # Returns a copy of the Array excluding the specified elements. + # + # ["David", "Rafael", "Aaron", "Todd"].excluding("Aaron", "Todd") # => ["David", "Rafael"] + # [ [ 0, 1 ], [ 1, 0 ] ].excluding([ [ 1, 0 ] ]) # => [ [ 0, 1 ] ] + # + # Note: This is an optimization of Enumerable#excluding that uses Array#- + # instead of Array#reject for performance reasons. + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#47 + def excluding(*elements); end + + # Extracts options from a set of arguments. Removes and returns the last + # element in the array if it's a hash, otherwise returns a blank hash. + # + # def options(*args) + # args.extract_options! + # end + # + # options(1, 2) # => {} + # options(1, 2, a: :b) # => {:a=>:b} + # + # source://activesupport//lib/active_support/core_ext/array/extract_options.rb#24 + def extract_options!; end + + # Equal to self[4]. + # + # %w( a b c d e ).fifth # => "e" + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#76 + def fifth; end + + # Equal to self[41]. Also known as accessing "the reddit". + # + # (1..42).to_a.forty_two # => 42 + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#83 + def forty_two; end + + # Equal to self[3]. + # + # %w( a b c d e ).fourth # => "d" + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#69 + def fourth; end + + # Returns the tail of the array from +position+. + # + # %w( a b c d ).from(0) # => ["a", "b", "c", "d"] + # %w( a b c d ).from(2) # => ["c", "d"] + # %w( a b c d ).from(10) # => [] + # %w().from(0) # => [] + # %w( a b c d ).from(-2) # => ["c", "d"] + # %w( a b c ).from(-10) # => [] + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#12 + def from(position); end + + # 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 + + # 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 + + # source://activesupport//lib/active_support/core_ext/enumerable.rb#310 + def sum(init = T.unsafe(nil), &block); end + + # Equal to self[2]. + # + # %w( a b c d e ).third # => "c" + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#62 + def third; end + + # Equal to self[-3]. + # + # %w( a b c d e ).third_to_last # => "c" + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#90 + def third_to_last; end + + # Returns the beginning of the array up to +position+. + # + # %w( a b c d ).to(0) # => ["a"] + # %w( a b c d ).to(2) # => ["a", "b", "c"] + # %w( a b c d ).to(10) # => ["a", "b", "c", "d"] + # %w().to(0) # => [] + # %w( a b c d ).to(-2) # => ["a", "b", "c"] + # %w( a b c ).to(-10) # => [] + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#24 + def to(position); end + + # Extends Array#to_s to convert a collection of elements into a + # comma separated id list if :db argument is given as the format. + # + # This method is aliased to to_formatted_s. + # + # Blog.all.to_fs(:db) # => "1,2,3" + # Blog.none.to_fs(:db) # => "null" + # [1,2].to_fs # => "[1, 2]" + # + # source://activesupport//lib/active_support/core_ext/array/conversions.rb#94 + def to_formatted_s(format = T.unsafe(nil)); end + + # Extends Array#to_s to convert a collection of elements into a + # comma separated id list if :db argument is given as the format. + # + # This method is aliased to to_formatted_s. + # + # Blog.all.to_fs(:db) # => "1,2,3" + # Blog.none.to_fs(:db) # => "null" + # [1,2].to_fs # => "[1, 2]" + # + # source://activesupport//lib/active_support/core_ext/array/conversions.rb#94 + def to_fs(format = T.unsafe(nil)); end + + # Calls to_param on all its elements and joins the result with + # slashes. This is used by url_for in Action Pack. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#42 + def to_param; end + + # Converts an array into a string suitable for use as a URL query string, + # using the given +key+ as the param name. + # + # ['Rails', 'coding'].to_query('hobbies') # => "hobbies%5B%5D=Rails&hobbies%5B%5D=coding" + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#50 + def to_query(key); end + + # Converts the array to a comma-separated sentence where the last element is + # joined by the connector word. + # + # You can pass the following options to change the default behavior. If you + # pass an option key that doesn't exist in the list below, it will raise an + # ArgumentError. + # + # ==== Options + # + # * :words_connector - The sign or word used to join all but the last + # element in arrays with three or more elements (default: ", "). + # * :last_word_connector - The sign or word used to join the last element + # in arrays with three or more elements (default: ", and "). + # * :two_words_connector - The sign or word used to join the elements + # in arrays with two elements (default: " and "). + # * :locale - If +i18n+ is available, you can set a locale and use + # the connector options defined on the 'support.array' namespace in the + # corresponding dictionary file. + # + # ==== Examples + # + # [].to_sentence # => "" + # ['one'].to_sentence # => "one" + # ['one', 'two'].to_sentence # => "one and two" + # ['one', 'two', 'three'].to_sentence # => "one, two, and three" + # + # ['one', 'two'].to_sentence(passing: 'invalid option') + # # => ArgumentError: Unknown key: :passing. Valid keys are: :words_connector, :two_words_connector, :last_word_connector, :locale + # + # ['one', 'two'].to_sentence(two_words_connector: '-') + # # => "one-two" + # + # ['one', 'two', 'three'].to_sentence(words_connector: ' or ', last_word_connector: ' or at least ') + # # => "one or two or at least three" + # + # Using :locale option: + # + # # Given this locale dictionary: + # # + # # es: + # # support: + # # array: + # # words_connector: " o " + # # two_words_connector: " y " + # # last_word_connector: " o al menos " + # + # ['uno', 'dos'].to_sentence(locale: :es) + # # => "uno y dos" + # + # ['uno', 'dos', 'tres'].to_sentence(locale: :es) + # # => "uno o dos o al menos tres" + # + # source://activesupport//lib/active_support/core_ext/array/conversions.rb#60 + def to_sentence(options = T.unsafe(nil)); end + + # Returns a string that represents the array in XML by invoking +to_xml+ + # on each element. Active Record collections delegate their representation + # in XML to this method. + # + # All elements are expected to respond to +to_xml+, if any of them does + # not then an exception is raised. + # + # The root node reflects the class name of the first element in plural + # if all elements belong to the same type and that's not Hash: + # + # customer.projects.to_xml + # + # + # + # + # 20000.0 + # 1567 + # 2008-04-09 + # ... + # + # + # 57230.0 + # 1567 + # 2008-04-15 + # ... + # + # + # + # Otherwise the root element is "objects": + # + # [{ foo: 1, bar: 2}, { baz: 3}].to_xml + # + # + # + # + # 2 + # 1 + # + # + # 3 + # + # + # + # If the collection is empty the root element is "nil-classes" by default: + # + # [].to_xml + # + # + # + # + # To ensure a meaningful root element use the :root option: + # + # customer_with_no_projects.projects.to_xml(root: 'projects') + # + # + # + # + # By default name of the node for the children of root is root.singularize. + # You can change it with the :children option. + # + # The +options+ hash is passed downwards: + # + # Message.all.to_xml(skip_types: true) + # + # + # + # + # 2008-03-07T09:58:18+01:00 + # 1 + # 1 + # 2008-03-07T09:58:18+01:00 + # 1 + # + # + # + # source://activesupport//lib/active_support/core_ext/array/conversions.rb#184 + def to_xml(options = T.unsafe(nil)); end + + # Returns a copy of the Array excluding the specified elements. + # + # ["David", "Rafael", "Aaron", "Todd"].excluding("Aaron", "Todd") # => ["David", "Rafael"] + # [ [ 0, 1 ], [ 1, 0 ] ].excluding([ [ 1, 0 ] ]) # => [ [ 0, 1 ] ] + # + # Note: This is an optimization of Enumerable#excluding that uses Array#- + # instead of Array#reject for performance reasons. + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#47 + def without(*elements); end + + class << self + # Wraps its argument in an array unless it is already an array (or array-like). + # + # Specifically: + # + # * If the argument is +nil+ an empty array is returned. + # * Otherwise, if the argument responds to +to_ary+ it is invoked, and its result returned. + # * Otherwise, returns an array with the argument as its single element. + # + # Array.wrap(nil) # => [] + # Array.wrap([1, 2, 3]) # => [1, 2, 3] + # Array.wrap(0) # => [0] + # + # This method is similar in purpose to Kernel#Array, but there are some differences: + # + # * If the argument responds to +to_ary+ the method is invoked. Kernel#Array + # moves on to try +to_a+ if the returned value is +nil+, but Array.wrap returns + # an array with the argument as its single element right away. + # * If the returned value from +to_ary+ is neither +nil+ nor an +Array+ object, Kernel#Array + # raises an exception, while Array.wrap does not, it just returns the value. + # * It does not call +to_a+ on the argument, if the argument does not respond to +to_ary+ + # it returns an array with the argument as its single element. + # + # The last point is easily explained with some enumerables: + # + # Array(foo: :bar) # => [[:foo, :bar]] + # Array.wrap(foo: :bar) # => [{:foo=>:bar}] + # + # There's also a related idiom that uses the splat operator: + # + # [*object] + # + # which returns [] for +nil+, but calls to Array(object) otherwise. + # + # The differences with Kernel#Array explained above + # apply to the rest of objects. + # + # source://activesupport//lib/active_support/core_ext/array/wrap.rb#39 + def wrap(object); end + end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#118 +class BigDecimal < ::Numeric + include ::ActiveSupport::BigDecimalWithDefaultFormat + + # A BigDecimal would be naturally represented as a JSON number. Most libraries, + # however, parse non-integer JSON numbers directly as floats. Clients using + # those libraries would get in general a wrong number and no way to recover + # other than manually inspecting the string with the JSON code itself. + # + # That's why a JSON string is returned. The JSON literal is not numeric, but + # if the other end knows by contract that the data is supposed to be a + # BigDecimal, it still has the chance to post-process the string and get the + # real value. + # + # source://activesupport//lib/active_support/core_ext/object/json.rb#128 + def as_json(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/big_decimal/conversions.rb#8 + def to_s(format = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/class/attribute.rb#5 +class Class < ::Module + # Declare a class-level attribute whose value is inheritable by subclasses. + # Subclasses can change their own value and it will not impact parent class. + # + # ==== Options + # + # * :instance_reader - Sets the instance reader method (defaults to true). + # * :instance_writer - Sets the instance writer method (defaults to true). + # * :instance_accessor - Sets both instance methods (defaults to true). + # * :instance_predicate - Sets a predicate method (defaults to true). + # * :default - Sets a default value for the attribute (defaults to nil). + # + # ==== Examples + # + # class Base + # class_attribute :setting + # end + # + # class Subclass < Base + # end + # + # Base.setting = true + # Subclass.setting # => true + # Subclass.setting = false + # Subclass.setting # => false + # Base.setting # => true + # + # In the above case as long as Subclass does not assign a value to setting + # by performing Subclass.setting = _something_, Subclass.setting + # would read value assigned to parent class. Once Subclass assigns a value then + # the value assigned by Subclass would be returned. + # + # This matches normal Ruby method inheritance: think of writing an attribute + # on a subclass as overriding the reader method. However, you need to be aware + # when using +class_attribute+ with mutable structures as +Array+ or +Hash+. + # In such cases, you don't want to do changes in place. Instead use setters: + # + # Base.setting = [] + # Base.setting # => [] + # Subclass.setting # => [] + # + # # Appending in child changes both parent and child because it is the same object: + # Subclass.setting << :foo + # Base.setting # => [:foo] + # Subclass.setting # => [:foo] + # + # # Use setters to not propagate changes: + # Base.setting = [] + # Subclass.setting += [:foo] + # Base.setting # => [] + # Subclass.setting # => [:foo] + # + # For convenience, an instance predicate method is defined as well. + # To skip it, pass instance_predicate: false. + # + # Subclass.setting? # => false + # + # Instances may overwrite the class value in the same way: + # + # Base.setting = true + # object = Base.new + # object.setting # => true + # object.setting = false + # object.setting # => false + # Base.setting # => true + # + # To opt out of the instance reader method, pass instance_reader: false. + # + # object.setting # => NoMethodError + # object.setting? # => NoMethodError + # + # To opt out of the instance writer method, pass instance_writer: false. + # + # object.setting = false # => NoMethodError + # + # To opt out of both instance methods, pass instance_accessor: false. + # + # To set a default value for the attribute, pass default:, like so: + # + # class_attribute :settings, default: {} + # + # source://activesupport//lib/active_support/core_ext/class/attribute.rb#85 + def class_attribute(*attrs, instance_accessor: T.unsafe(nil), instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_predicate: T.unsafe(nil), default: T.unsafe(nil)); end + + # Returns an array with all classes that are < than its receiver. + # + # class C; end + # C.descendants # => [] + # + # class B < C; end + # C.descendants # => [B] + # + # class A < B; end + # C.descendants # => [B, A] + # + # class D < C; end + # C.descendants # => [B, A, D] + # + # source://activesupport//lib/active_support/core_ext/class/subclasses.rb#20 + def descendants; end +end + +# source://activesupport//lib/active_support/core_ext/date/zones.rb#6 +class Date + include ::Comparable + include ::DateAndTime::Zones + include ::DateAndTime::Calculations + + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#90 + def +(other); end + + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#100 + def -(other); end + + # Allow Date to be compared with Time by converting to DateTime and relying on the <=> from there. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#137 + def <=>(other); end + + # Duck-types as a Date-like class. See Object#acts_like?. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date/acts_like.rb#7 + def acts_like_date?; end + + # Provides precise Date calculations for years, months, and days. The +options+ parameter takes a hash with + # any of these keys: :years, :months, :weeks, :days. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#112 + def advance(options); end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) + # and then subtracts the specified number of seconds. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#55 + def ago(seconds); end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#197 + def as_json(options = T.unsafe(nil)); end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#67 + def at_beginning_of_day; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the end of the day (23:59:59) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#85 + def at_end_of_day; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 + def at_midday; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 + def at_middle_of_day; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#67 + def at_midnight; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 + def at_noon; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#67 + def beginning_of_day; end + + # Returns a new Date where one or more of the elements have been changed according to the +options+ parameter. + # The +options+ parameter is a hash with a combination of these keys: :year, :month, :day. + # + # Date.new(2007, 5, 12).change(day: 1) # => Date.new(2007, 5, 1) + # Date.new(2007, 5, 12).change(year: 2005, month: 1) # => Date.new(2005, 1, 12) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#128 + def change(options); end + + # Allow Date to be compared with Time by converting to DateTime and relying on the <=> from there. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#137 + def compare_with_coercion(other); end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the end of the day (23:59:59) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#85 + def end_of_day; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) + # and then adds the specified number of seconds + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#61 + def in(seconds); end + + # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005" + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#62 + def inspect; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 + def midday; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 + def middle_of_day; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#67 + def midnight; end + + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#100 + def minus_with_duration(other); end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#75 + def noon; end + + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#90 + def plus_with_duration(other); end + + # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005" + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#62 + def readable_inspect; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) + # and then adds the specified number of seconds + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#61 + def since(seconds); end + + # Convert to a formatted string. See DATE_FORMATS for predefined formats. + # + # This method is aliased to to_formatted_s. + # + # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 + # + # date.to_fs(:db) # => "2007-11-10" + # date.to_formatted_s(:db) # => "2007-11-10" + # + # date.to_fs(:short) # => "10 Nov" + # date.to_fs(:number) # => "20071110" + # date.to_fs(:long) # => "November 10, 2007" + # date.to_fs(:long_ordinal) # => "November 10th, 2007" + # date.to_fs(:rfc822) # => "10 Nov 2007" + # date.to_fs(:iso8601) # => "2007-11-10" + # + # == Adding your own date formats to to_fs + # You can add your own formats to the Date::DATE_FORMATS hash. + # Use the format name as the hash key and either a strftime string + # or Proc instance that takes a date argument as the value. + # + # # config/initializers/date_formats.rb + # Date::DATE_FORMATS[:month_and_year] = '%B %Y' + # Date::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#47 + def to_formatted_s(format = T.unsafe(nil)); end + + # Convert to a formatted string. See DATE_FORMATS for predefined formats. + # + # This method is aliased to to_formatted_s. + # + # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 + # + # date.to_fs(:db) # => "2007-11-10" + # date.to_formatted_s(:db) # => "2007-11-10" + # + # date.to_fs(:short) # => "10 Nov" + # date.to_fs(:number) # => "20071110" + # date.to_fs(:long) # => "November 10, 2007" + # date.to_fs(:long_ordinal) # => "November 10th, 2007" + # date.to_fs(:rfc822) # => "10 Nov 2007" + # date.to_fs(:iso8601) # => "2007-11-10" + # + # == Adding your own date formats to to_fs + # You can add your own formats to the Date::DATE_FORMATS hash. + # Use the format name as the hash key and either a strftime string + # or Proc instance that takes a date argument as the value. + # + # # config/initializers/date_formats.rb + # Date::DATE_FORMATS[:month_and_year] = '%B %Y' + # Date::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#47 + def to_fs(format = T.unsafe(nil)); end + + # Converts a Date instance to a Time, where the time is set to the beginning of the day. + # The timezone can be either +:local+ or +:utc+ (default +:local+). + # + # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 + # + # date.to_time # => 2007-11-10 00:00:00 0800 + # date.to_time(:local) # => 2007-11-10 00:00:00 0800 + # + # date.to_time(:utc) # => 2007-11-10 00:00:00 UTC + # + # NOTE: The +:local+ timezone is Ruby's *process* timezone, i.e. ENV['TZ']. + # If the application's timezone is needed, then use +in_time_zone+ instead. + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#82 + def to_time(form = T.unsafe(nil)); end + + # Returns a string which represents the time in used time zone as DateTime + # defined by XML Schema: + # + # date = Date.new(2015, 05, 23) # => Sat, 23 May 2015 + # date.xmlschema # => "2015-05-23T00:00:00+04:00" + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#94 + def xmlschema; end + + class << self + # Returns the week start (e.g. +:monday+) for the current request, if this has been set (via Date.beginning_of_week=). + # If Date.beginning_of_week has not been set for the current request, returns the week start specified in config.beginning_of_week. + # If no +config.beginning_of_week+ was specified, returns +:monday+. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#19 + def beginning_of_week; end + + # Sets Date.beginning_of_week to a week start (e.g. +:monday+) for current request/thread. + # + # This method accepts any of the following day symbols: + # +:monday+, +:tuesday+, +:wednesday+, +:thursday+, +:friday+, +:saturday+, +:sunday+ + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#27 + def beginning_of_week=(week_start); end + + # Returns the value of attribute beginning_of_week_default. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#14 + def beginning_of_week_default; end + + # Sets the attribute beginning_of_week_default + # + # @param value the value to set the attribute beginning_of_week_default to. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#14 + def beginning_of_week_default=(_arg0); end + + # Returns Time.zone.today when Time.zone or config.time_zone are set, otherwise just returns Date.today. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#48 + def current; end + + # Returns week start day symbol (e.g. +:monday+), or raises an +ArgumentError+ for invalid day symbol. + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#32 + def find_beginning_of_week!(week_start); end + + # Returns a new Date representing the date 1 day after today (i.e. tomorrow's date). + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#43 + def tomorrow; end + + # Returns a new Date representing the date 1 day ago (i.e. yesterday's date). + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#38 + def yesterday; end + end +end + +# source://activesupport//lib/active_support/core_ext/date/conversions.rb#9 +Date::DATE_FORMATS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#5 +module DateAndTime; end + +# source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#7 +module DateAndTime::Calculations + # Returns true if the date/time falls after date_or_time. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#72 + def after?(date_or_time); end + + # Returns a Range representing the whole day of the current date/time. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#300 + def all_day; end + + # Returns a Range representing the whole month of the current date/time. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#311 + def all_month; end + + # Returns a Range representing the whole quarter of the current date/time. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#316 + def all_quarter; end + + # Returns a Range representing the whole week of the current date/time. + # Week starts on start_day, default is Date.beginning_of_week or config.beginning_of_week when set. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#306 + def all_week(start_day = T.unsafe(nil)); end + + # Returns a Range representing the whole year of the current date/time. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#321 + def all_year; end + + # Returns a new date/time at the start of the month. + # + # today = Date.today # => Thu, 18 Jun 2015 + # today.beginning_of_month # => Mon, 01 Jun 2015 + # + # +DateTime+ objects will have a time set to 0:00. + # + # now = DateTime.current # => Thu, 18 Jun 2015 15:23:13 +0000 + # now.beginning_of_month # => Mon, 01 Jun 2015 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#125 + def at_beginning_of_month; end + + # Returns a new date/time at the start of the quarter. + # + # today = Date.today # => Fri, 10 Jul 2015 + # today.beginning_of_quarter # => Wed, 01 Jul 2015 + # + # +DateTime+ objects will have a time set to 0:00. + # + # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 + # now.beginning_of_quarter # => Wed, 01 Jul 2015 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#139 + def at_beginning_of_quarter; end + + # Returns a new date/time representing the start of this week on the given day. + # Week is assumed to start on +start_day+, default is + # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. + # +DateTime+ objects have their time set to 0:00. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#257 + def at_beginning_of_week(start_day = T.unsafe(nil)); end + + # Returns a new date/time at the beginning of the year. + # + # today = Date.today # => Fri, 10 Jul 2015 + # today.beginning_of_year # => Thu, 01 Jan 2015 + # + # +DateTime+ objects will have a time set to 0:00. + # + # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 + # now.beginning_of_year # => Thu, 01 Jan 2015 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#169 + def at_beginning_of_year; end + + # Returns a new date/time representing the end of the month. + # DateTime objects will have a time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#286 + def at_end_of_month; end + + # Returns a new date/time at the end of the quarter. + # + # today = Date.today # => Fri, 10 Jul 2015 + # today.end_of_quarter # => Wed, 30 Sep 2015 + # + # +DateTime+ objects will have a time set to 23:59:59. + # + # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 + # now.end_of_quarter # => Wed, 30 Sep 2015 23:59:59 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#154 + def at_end_of_quarter; end + + # Returns a new date/time representing the end of this week on the given day. + # Week is assumed to start on +start_day+, default is + # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. + # DateTime objects have their time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#273 + def at_end_of_week(start_day = T.unsafe(nil)); end + + # Returns a new date/time representing the end of the year. + # DateTime objects will have a time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#294 + def at_end_of_year; end + + # Returns true if the date/time falls before date_or_time. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#67 + def before?(date_or_time); end + + # Returns a new date/time at the start of the month. + # + # today = Date.today # => Thu, 18 Jun 2015 + # today.beginning_of_month # => Mon, 01 Jun 2015 + # + # +DateTime+ objects will have a time set to 0:00. + # + # now = DateTime.current # => Thu, 18 Jun 2015 15:23:13 +0000 + # now.beginning_of_month # => Mon, 01 Jun 2015 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#125 + def beginning_of_month; end + + # Returns a new date/time at the start of the quarter. + # + # today = Date.today # => Fri, 10 Jul 2015 + # today.beginning_of_quarter # => Wed, 01 Jul 2015 + # + # +DateTime+ objects will have a time set to 0:00. + # + # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 + # now.beginning_of_quarter # => Wed, 01 Jul 2015 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#139 + def beginning_of_quarter; end + + # Returns a new date/time representing the start of this week on the given day. + # Week is assumed to start on +start_day+, default is + # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. + # +DateTime+ objects have their time set to 0:00. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#257 + def beginning_of_week(start_day = T.unsafe(nil)); end + + # Returns a new date/time at the beginning of the year. + # + # today = Date.today # => Fri, 10 Jul 2015 + # today.beginning_of_year # => Thu, 01 Jan 2015 + # + # +DateTime+ objects will have a time set to 0:00. + # + # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 + # now.beginning_of_year # => Thu, 01 Jan 2015 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#169 + def beginning_of_year; end + + # Returns a new date/time the specified number of days ago. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#77 + def days_ago(days); end + + # Returns a new date/time the specified number of days in the future. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#82 + def days_since(days); end + + # Returns the number of days to the start of the week on the given day. + # Week is assumed to start on +start_day+, default is + # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#248 + def days_to_week_start(start_day = T.unsafe(nil)); end + + # Returns a new date/time representing the end of the month. + # DateTime objects will have a time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#286 + def end_of_month; end + + # Returns a new date/time at the end of the quarter. + # + # today = Date.today # => Fri, 10 Jul 2015 + # today.end_of_quarter # => Wed, 30 Sep 2015 + # + # +DateTime+ objects will have a time set to 23:59:59. + # + # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 + # now.end_of_quarter # => Wed, 30 Sep 2015 23:59:59 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#154 + def end_of_quarter; end + + # Returns a new date/time representing the end of this week on the given day. + # Week is assumed to start on +start_day+, default is + # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. + # DateTime objects have their time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#273 + def end_of_week(start_day = T.unsafe(nil)); end + + # Returns a new date/time representing the end of the year. + # DateTime objects will have a time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#294 + def end_of_year; end + + # Returns true if the date/time is in the future. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#52 + def future?; end + + # Short-hand for months_ago(1). + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#230 + def last_month; end + + # Short-hand for months_ago(3). + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#235 + def last_quarter; end + + # Returns a new date/time representing the given day in the previous week. + # Week is assumed to start on +start_day+, default is + # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. + # DateTime objects have their time set to 0:00 unless +same_time+ is true. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#213 + def last_week(start_day = T.unsafe(nil), same_time: T.unsafe(nil)); end + + # Returns a new date/time representing the previous weekday. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#220 + def last_weekday; end + + # Short-hand for years_ago(1). + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#241 + def last_year; end + + # Returns Monday of this week assuming that week starts on Monday. + # +DateTime+ objects have their time set to 0:00. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#265 + def monday; end + + # Returns a new date/time the specified number of months ago. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#97 + def months_ago(months); end + + # Returns a new date/time the specified number of months in the future. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#102 + def months_since(months); end + + # Returns true if the date/time is tomorrow. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#35 + def next_day?; end + + # Returns a new date/time representing the next occurrence of the specified day of week. + # + # today = Date.today # => Thu, 14 Dec 2017 + # today.next_occurring(:monday) # => Mon, 18 Dec 2017 + # today.next_occurring(:thursday) # => Thu, 21 Dec 2017 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#330 + def next_occurring(day_of_week); end + + # Short-hand for months_since(3). + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#205 + def next_quarter; end + + # Returns a new date/time representing the given day in the next week. + # + # today = Date.today # => Thu, 07 May 2015 + # today.next_week # => Mon, 11 May 2015 + # + # The +given_day_in_next_week+ defaults to the beginning of the week + # which is determined by +Date.beginning_of_week+ or +config.beginning_of_week+ + # when set. + # + # today = Date.today # => Thu, 07 May 2015 + # today.next_week(:friday) # => Fri, 15 May 2015 + # + # +DateTime+ objects have their time set to 0:00 unless +same_time+ is true. + # + # now = DateTime.current # => Thu, 07 May 2015 13:31:16 +0000 + # now.next_week # => Mon, 11 May 2015 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#190 + def next_week(given_day_in_next_week = T.unsafe(nil), same_time: T.unsafe(nil)); end + + # Returns a new date/time representing the next weekday. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#196 + def next_weekday; end + + # Returns true if the date/time does not fall on a Saturday or Sunday. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#62 + def on_weekday?; end + + # Returns true if the date/time falls on a Saturday or Sunday. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#57 + def on_weekend?; end + + # Returns true if the date/time is in the past. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#47 + def past?; end + + # Returns true if the date/time is yesterday. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#41 + def prev_day?; end + + # Returns a new date/time representing the previous occurrence of the specified day of week. + # + # today = Date.today # => Thu, 14 Dec 2017 + # today.prev_occurring(:monday) # => Mon, 11 Dec 2017 + # today.prev_occurring(:thursday) # => Thu, 07 Dec 2017 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#341 + def prev_occurring(day_of_week); end + + # Short-hand for months_ago(3). + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#235 + def prev_quarter; end + + # Returns a new date/time representing the given day in the previous week. + # Week is assumed to start on +start_day+, default is + # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. + # DateTime objects have their time set to 0:00 unless +same_time+ is true. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#213 + def prev_week(start_day = T.unsafe(nil), same_time: T.unsafe(nil)); end + + # Returns a new date/time representing the previous weekday. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#220 + def prev_weekday; end + + # Returns Sunday of this week assuming that week starts on Monday. + # +DateTime+ objects have their time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#280 + def sunday; end + + # Returns true if the date/time is today. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#30 + def today?; end + + # Returns a new date/time representing tomorrow. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#25 + def tomorrow; end + + # Returns true if the date/time is tomorrow. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#35 + def tomorrow?; end + + # Returns a new date/time the specified number of weeks ago. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#87 + def weeks_ago(weeks); end + + # Returns a new date/time the specified number of weeks in the future. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#92 + def weeks_since(weeks); end + + # Returns a new date/time the specified number of years ago. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#107 + def years_ago(years); end + + # Returns a new date/time the specified number of years in the future. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#112 + def years_since(years); end + + # Returns a new date/time representing yesterday. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#20 + def yesterday; end + + # Returns true if the date/time is yesterday. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#41 + def yesterday?; end + + private + + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#360 + def copy_time_to(other); end + + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#356 + def days_span(day); end + + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#348 + def first_hour(date_or_time); end + + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#352 + def last_hour(date_or_time); end +end + +# source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#8 +DateAndTime::Calculations::DAYS_INTO_WEEK = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#17 +DateAndTime::Calculations::WEEKEND_DAYS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#6 +module DateAndTime::Compatibility + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#14 + def preserve_timezone; end + + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#29 + def utc_to_local_returns_utc_offset_times; end + + class << self + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#14 + def preserve_timezone; end + + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#14 + def preserve_timezone=(val); end + + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#29 + def utc_to_local_returns_utc_offset_times; end + + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#29 + def utc_to_local_returns_utc_offset_times=(val); end + end +end + +# source://activesupport//lib/active_support/core_ext/date_and_time/zones.rb#4 +module DateAndTime::Zones + # Returns the simultaneous time in Time.zone if a zone is given or + # if Time.zone_default is set. Otherwise, it returns the current time. + # + # Time.zone = 'Hawaii' # => 'Hawaii' + # Time.utc(2000).in_time_zone # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # Date.new(2000).in_time_zone # => Sat, 01 Jan 2000 00:00:00 HST -10:00 + # + # This method is similar to Time#localtime, except that it uses Time.zone as the local zone + # instead of the operating system's time zone. + # + # You can also pass in a TimeZone instance or string that identifies a TimeZone as an argument, + # and the conversion will be based on that zone instead of Time.zone. + # + # Time.utc(2000).in_time_zone('Alaska') # => Fri, 31 Dec 1999 15:00:00 AKST -09:00 + # Date.new(2000).in_time_zone('Alaska') # => Sat, 01 Jan 2000 00:00:00 AKST -09:00 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/zones.rb#20 + def in_time_zone(zone = T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/core_ext/date_and_time/zones.rb#32 + def time_with_zone(time, zone); end +end + +# source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#5 +class DateTime < ::Date + # Layers additional behavior on DateTime#<=> so that Time and + # ActiveSupport::TimeWithZone instances can be compared with a DateTime. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#204 + def <=>(other); end + + # Uses Date to provide precise Time calculations for years, months, and days. + # The +options+ parameter takes a hash with any of these keys: :years, + # :months, :weeks, :days, :hours, + # :minutes, :seconds. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#78 + def advance(options); end + + # Returns a new DateTime representing the time a number of seconds ago. + # Do not use this method in combination with x.months, use months_ago instead! + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#105 + def ago(seconds); end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#207 + def as_json(options = T.unsafe(nil)); end + + # Returns a new DateTime representing the start of the day (0:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#118 + def at_beginning_of_day; end + + # Returns a new DateTime representing the start of the hour (hh:00:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#142 + def at_beginning_of_hour; end + + # Returns a new DateTime representing the start of the minute (hh:mm:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#154 + def at_beginning_of_minute; end + + # Returns a new DateTime representing the end of the day (23:59:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#136 + def at_end_of_day; end + + # Returns a new DateTime representing the end of the hour (hh:59:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#148 + def at_end_of_hour; end + + # Returns a new DateTime representing the end of the minute (hh:mm:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#160 + def at_end_of_minute; end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#126 + def at_midday; end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#126 + def at_middle_of_day; end + + # Returns a new DateTime representing the start of the day (0:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#118 + def at_midnight; end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#126 + def at_noon; end + + # Returns a new DateTime representing the start of the day (0:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#118 + def beginning_of_day; end + + # Returns a new DateTime representing the start of the hour (hh:00:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#142 + def beginning_of_hour; end + + # Returns a new DateTime representing the start of the minute (hh:mm:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#154 + def beginning_of_minute; end + + # Returns a new DateTime where one or more of the elements have been changed + # according to the +options+ parameter. The time options (:hour, + # :min, :sec) reset cascadingly, so if only the hour is + # passed, then minute and sec is set to 0. If the hour and minute is passed, + # then sec is set to 0. The +options+ parameter takes a hash with any of these + # keys: :year, :month, :day, :hour, + # :min, :sec, :offset, :start. + # + # DateTime.new(2012, 8, 29, 22, 35, 0).change(day: 1) # => DateTime.new(2012, 8, 1, 22, 35, 0) + # DateTime.new(2012, 8, 29, 22, 35, 0).change(year: 1981, day: 1) # => DateTime.new(1981, 8, 1, 22, 35, 0) + # DateTime.new(2012, 8, 29, 22, 35, 0).change(year: 1981, hour: 0) # => DateTime.new(1981, 8, 29, 0, 0, 0) + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#51 + def change(options); end + + # Returns a new DateTime representing the end of the day (23:59:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#136 + def end_of_day; end + + # Returns a new DateTime representing the end of the hour (hh:59:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#148 + def end_of_hour; end + + # Returns a new DateTime representing the end of the minute (hh:mm:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#160 + def end_of_minute; end + + # Returns a formatted string of the offset from UTC, or an alternative + # string if the time zone is already UTC. + # + # datetime = DateTime.civil(2000, 1, 1, 0, 0, 0, Rational(-6, 24)) + # datetime.formatted_offset # => "-06:00" + # datetime.formatted_offset(false) # => "-0600" + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#51 + def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#180 + def getgm; end + + # Returns a Time instance of the simultaneous time in the system timezone. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#166 + def getlocal(utc_offset = T.unsafe(nil)); end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#180 + def getutc; end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#180 + def gmtime; end + + # Returns a new DateTime representing the time a number of seconds since the + # instance time. Do not use this method in combination with x.months, use + # months_since instead! + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#112 + def in(seconds); end + + # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005 14:30:00 +0000". + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#56 + def inspect; end + + # Returns a Time instance of the simultaneous time in the system timezone. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#166 + def localtime(utc_offset = T.unsafe(nil)); end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#126 + def midday; end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#126 + def middle_of_day; end + + # Returns a new DateTime representing the start of the day (0:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#118 + def midnight; end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#126 + def noon; end + + # Returns the fraction of a second as nanoseconds + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#94 + def nsec; end + + # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005 14:30:00 +0000". + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#56 + def readable_inspect; end + + # Returns the number of seconds since 00:00:00. + # + # DateTime.new(2012, 8, 29, 0, 0, 0).seconds_since_midnight # => 0 + # DateTime.new(2012, 8, 29, 12, 34, 56).seconds_since_midnight # => 45296 + # DateTime.new(2012, 8, 29, 23, 59, 59).seconds_since_midnight # => 86399 + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#20 + def seconds_since_midnight; end + + # Returns the number of seconds until 23:59:59. + # + # DateTime.new(2012, 8, 29, 0, 0, 0).seconds_until_end_of_day # => 86399 + # DateTime.new(2012, 8, 29, 12, 34, 56).seconds_until_end_of_day # => 41103 + # DateTime.new(2012, 8, 29, 23, 59, 59).seconds_until_end_of_day # => 0 + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#29 + def seconds_until_end_of_day; end + + # Returns a new DateTime representing the time a number of seconds since the + # instance time. Do not use this method in combination with x.months, use + # months_since instead! + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#112 + def since(seconds); end + + # Returns the fraction of a second as a +Rational+ + # + # DateTime.new(2012, 8, 29, 0, 0, 0.5).subsec # => (1/2) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#36 + def subsec; end + + # Converts +self+ to a floating-point number of seconds, including fractional microseconds, since the Unix epoch. + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#79 + def to_f; end + + # Convert to a formatted string. See Time::DATE_FORMATS for predefined formats. + # + # This method is aliased to to_formatted_s. + # + # === Examples + # datetime = DateTime.civil(2007, 12, 4, 0, 0, 0, 0) # => Tue, 04 Dec 2007 00:00:00 +0000 + # + # datetime.to_fs(:db) # => "2007-12-04 00:00:00" + # datetime.to_formatted_s(:db) # => "2007-12-04 00:00:00" + # datetime.to_fs(:number) # => "20071204000000" + # datetime.to_fs(:short) # => "04 Dec 00:00" + # datetime.to_fs(:long) # => "December 04, 2007 00:00" + # datetime.to_fs(:long_ordinal) # => "December 4th, 2007 00:00" + # datetime.to_fs(:rfc822) # => "Tue, 04 Dec 2007 00:00:00 +0000" + # datetime.to_fs(:iso8601) # => "2007-12-04T00:00:00+00:00" + # + # == Adding your own datetime formats to to_fs + # DateTime formats are shared with Time. You can add your own to the + # Time::DATE_FORMATS hash. Use the format name as the hash key and + # either a strftime string or Proc instance that takes a time or + # datetime argument as the value. + # + # # config/initializers/time_formats.rb + # Time::DATE_FORMATS[:month_and_year] = '%B %Y' + # Time::DATE_FORMATS[:short_ordinal] = lambda { |time| time.strftime("%B #{time.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#35 + def to_formatted_s(format = T.unsafe(nil)); end + + # Convert to a formatted string. See Time::DATE_FORMATS for predefined formats. + # + # This method is aliased to to_formatted_s. + # + # === Examples + # datetime = DateTime.civil(2007, 12, 4, 0, 0, 0, 0) # => Tue, 04 Dec 2007 00:00:00 +0000 + # + # datetime.to_fs(:db) # => "2007-12-04 00:00:00" + # datetime.to_formatted_s(:db) # => "2007-12-04 00:00:00" + # datetime.to_fs(:number) # => "20071204000000" + # datetime.to_fs(:short) # => "04 Dec 00:00" + # datetime.to_fs(:long) # => "December 04, 2007 00:00" + # datetime.to_fs(:long_ordinal) # => "December 4th, 2007 00:00" + # datetime.to_fs(:rfc822) # => "Tue, 04 Dec 2007 00:00:00 +0000" + # datetime.to_fs(:iso8601) # => "2007-12-04T00:00:00+00:00" + # + # == Adding your own datetime formats to to_fs + # DateTime formats are shared with Time. You can add your own to the + # Time::DATE_FORMATS hash. Use the format name as the hash key and + # either a strftime string or Proc instance that takes a time or + # datetime argument as the value. + # + # # config/initializers/time_formats.rb + # Time::DATE_FORMATS[:month_and_year] = '%B %Y' + # Time::DATE_FORMATS[:short_ordinal] = lambda { |time| time.strftime("%B #{time.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#35 + def to_fs(format = T.unsafe(nil)); end + + # Converts +self+ to an integer number of seconds since the Unix epoch. + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#84 + def to_i; end + + # Returns the fraction of a second as microseconds + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#89 + def usec; end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#180 + def utc; end + + # Returns +true+ if offset == 0. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#193 + def utc?; end + + # Returns the offset value in seconds. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#198 + def utc_offset; end + + private + + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#99 + def offset_in_seconds; end + + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#103 + def seconds_since_unix_epoch; end + + class << self + # Returns DateTime with local offset for given year if format is local else + # offset is zero. + # + # DateTime.civil_from_format :local, 2012 + # # => Sun, 01 Jan 2012 00:00:00 +0300 + # DateTime.civil_from_format :local, 2012, 12, 17 + # # => Mon, 17 Dec 2012 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#69 + def civil_from_format(utc_or_local, year, month = T.unsafe(nil), day = T.unsafe(nil), hour = T.unsafe(nil), min = T.unsafe(nil), sec = T.unsafe(nil)); end + + # Returns Time.zone.now.to_datetime when Time.zone or + # config.time_zone are set, otherwise returns + # Time.now.to_datetime. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#10 + def current; end + end +end + +# source://activesupport//lib/active_support/core_ext/object/try.rb#117 +class Delegator < ::BasicObject + include ::ActiveSupport::Tryable +end + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#8 +module ERB::Util + private + + # A utility method for escaping HTML tag characters. + # This method is also aliased as h. + # + # puts html_escape('is a > 0 & a < 10?') + # # => is a > 0 & a < 10? + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#27 + def h(s); end + + # A utility method for escaping HTML tag characters. + # This method is also aliased as h. + # + # puts html_escape('is a > 0 & a < 10?') + # # => is a > 0 & a < 10? + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#27 + def html_escape(s); end + + # A utility method for escaping HTML without affecting existing escaped entities. + # + # html_escape_once('1 < 2 & 3') + # # => "1 < 2 & 3" + # + # html_escape_once('<< Accept & Checkout') + # # => "<< Accept & Checkout" + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#58 + def html_escape_once(s); end + + # A utility method for escaping HTML entities in JSON strings. Specifically, the + # &, > and < characters are replaced with their equivalent unicode escaped form - + # \u0026, \u003e, and \u003c. The Unicode sequences \u2028 and \u2029 are also + # escaped as they are treated as newline characters in some JavaScript engines. + # These sequences have identical meaning as the original characters inside the + # context of a JSON string, so assuming the input is a valid and well-formed + # JSON value, the output will have equivalent meaning when parsed: + # + # json = JSON.generate({ name: ""}) + # # => "{\"name\":\"\"}" + # + # json_escape(json) + # # => "{\"name\":\"\\u003C/script\\u003E\\u003Cscript\\u003Ealert('PWNED!!!')\\u003C/script\\u003E\"}" + # + # JSON.parse(json) == JSON.parse(json_escape(json)) + # # => true + # + # The intended use case for this method is to escape JSON strings before including + # them inside a script tag to avoid XSS vulnerability: + # + # + # + # It is necessary to +raw+ the result of +json_escape+, so that quotation marks + # don't get converted to " entities. +json_escape+ doesn't + # automatically flag the result as HTML safe, since the raw value is unsafe to + # use inside HTML attributes. + # + # If your JSON is being used downstream for insertion into the DOM, be aware of + # whether or not it is being inserted via html(). Most jQuery plugins do this. + # If that is the case, be sure to +html_escape+ or +sanitize+ any user-generated + # content returned by your JSON. + # + # If you need to output JSON elsewhere in your HTML, you can just do something + # like this, as any unsafe characters (including quotation marks) will be + # automatically escaped for you: + # + #
    ...
    + # + # WARNING: this helper only works with valid JSON. Using this on non-JSON values + # will open up serious XSS vulnerabilities. For example, if you replace the + # +current_user.to_json+ in the example above with user input instead, the browser + # will happily eval() that string as JavaScript. + # + # The escaping performed in this method is identical to those performed in the + # Active Support JSON encoder when +ActiveSupport.escape_html_entities_in_json+ is + # set to true. Because this transformation is idempotent, this helper can be + # applied even if +ActiveSupport.escape_html_entities_in_json+ is already true. + # + # Therefore, when you are unsure if +ActiveSupport.escape_html_entities_in_json+ + # is enabled, or if you are unsure where your JSON string originated from, it + # is recommended that you always apply this helper (other libraries, such as the + # JSON gem, do not provide this kind of protection by default; also some gems + # might override +to_json+ to bypass Active Support's encoder). + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#120 + def json_escape(s); end + + # HTML escapes strings but doesn't wrap them with an ActiveSupport::SafeBuffer. + # This method is not for public consumption! Seriously! + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#41 + def unwrapped_html_escape(s); end + + # A utility method for escaping XML names of tags and names of attributes. + # + # xml_name_escape('1 < 2 & 3') + # # => "1___2___3" + # + # It follows the requirements of the specification: https://www.w3.org/TR/REC-xml/#NT-Name + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#133 + def xml_name_escape(name); end + + class << self + # A utility method for escaping HTML tag characters. + # This method is also aliased as h. + # + # puts html_escape('is a > 0 & a < 10?') + # # => is a > 0 & a < 10? + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#27 + def h(s); end + + # A utility method for escaping HTML tag characters. + # This method is also aliased as h. + # + # puts html_escape('is a > 0 & a < 10?') + # # => is a > 0 & a < 10? + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#27 + def html_escape(s); end + + # A utility method for escaping HTML without affecting existing escaped entities. + # + # html_escape_once('1 < 2 & 3') + # # => "1 < 2 & 3" + # + # html_escape_once('<< Accept & Checkout') + # # => "<< Accept & Checkout" + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#58 + def html_escape_once(s); end + + # A utility method for escaping HTML entities in JSON strings. Specifically, the + # &, > and < characters are replaced with their equivalent unicode escaped form - + # \u0026, \u003e, and \u003c. The Unicode sequences \u2028 and \u2029 are also + # escaped as they are treated as newline characters in some JavaScript engines. + # These sequences have identical meaning as the original characters inside the + # context of a JSON string, so assuming the input is a valid and well-formed + # JSON value, the output will have equivalent meaning when parsed: + # + # json = JSON.generate({ name: ""}) + # # => "{\"name\":\"\"}" + # + # json_escape(json) + # # => "{\"name\":\"\\u003C/script\\u003E\\u003Cscript\\u003Ealert('PWNED!!!')\\u003C/script\\u003E\"}" + # + # JSON.parse(json) == JSON.parse(json_escape(json)) + # # => true + # + # The intended use case for this method is to escape JSON strings before including + # them inside a script tag to avoid XSS vulnerability: + # + # + # + # It is necessary to +raw+ the result of +json_escape+, so that quotation marks + # don't get converted to " entities. +json_escape+ doesn't + # automatically flag the result as HTML safe, since the raw value is unsafe to + # use inside HTML attributes. + # + # If your JSON is being used downstream for insertion into the DOM, be aware of + # whether or not it is being inserted via html(). Most jQuery plugins do this. + # If that is the case, be sure to +html_escape+ or +sanitize+ any user-generated + # content returned by your JSON. + # + # If you need to output JSON elsewhere in your HTML, you can just do something + # like this, as any unsafe characters (including quotation marks) will be + # automatically escaped for you: + # + #
    ...
    + # + # WARNING: this helper only works with valid JSON. Using this on non-JSON values + # will open up serious XSS vulnerabilities. For example, if you replace the + # +current_user.to_json+ in the example above with user input instead, the browser + # will happily eval() that string as JavaScript. + # + # The escaping performed in this method is identical to those performed in the + # Active Support JSON encoder when +ActiveSupport.escape_html_entities_in_json+ is + # set to true. Because this transformation is idempotent, this helper can be + # applied even if +ActiveSupport.escape_html_entities_in_json+ is already true. + # + # Therefore, when you are unsure if +ActiveSupport.escape_html_entities_in_json+ + # is enabled, or if you are unsure where your JSON string originated from, it + # is recommended that you always apply this helper (other libraries, such as the + # JSON gem, do not provide this kind of protection by default; also some gems + # might override +to_json+ to bypass Active Support's encoder). + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#120 + def json_escape(s); end + + # HTML escapes strings but doesn't wrap them with an ActiveSupport::SafeBuffer. + # This method is not for public consumption! Seriously! + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#41 + def unwrapped_html_escape(s); end + + # A utility method for escaping XML names of tags and names of attributes. + # + # xml_name_escape('1 < 2 & 3') + # # => "1___2___3" + # + # It follows the requirements of the specification: https://www.w3.org/TR/REC-xml/#NT-Name + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#133 + def xml_name_escape(name); end + end +end + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#9 +ERB::Util::HTML_ESCAPE = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#11 +ERB::Util::HTML_ESCAPE_ONCE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#10 +ERB::Util::JSON_ESCAPE = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#12 +ERB::Util::JSON_ESCAPE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#19 +ERB::Util::TAG_NAME_FOLLOWING_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#20 +ERB::Util::TAG_NAME_REPLACEMENT_CHAR = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#18 +ERB::Util::TAG_NAME_START_REGEXP = T.let(T.unsafe(nil), Regexp) + +# Following XML requirements: https://www.w3.org/TR/REC-xml/#NT-Name +# +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#15 +ERB::Util::TAG_NAME_START_REGEXP_SET = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/core_ext/object/json.rb#139 +module Enumerable + extend ::ActiveSupport::EnumerableCoreExt::Constants + + # source://activesupport//lib/active_support/core_ext/object/json.rb#140 + def as_json(options = T.unsafe(nil)); end + + # Returns a new +Array+ without the blank items. + # Uses Object#blank? for determining if an item is blank. + # + # [1, "", nil, 2, " ", [], {}, false, true].compact_blank + # # => [1, 2, true] + # + # Set.new([nil, "", 1, 2]) + # # => [2, 1] (or [1, 2]) + # + # When called on a +Hash+, returns a new +Hash+ without the blank values. + # + # { a: "", b: 1, c: nil, d: [], e: false, f: true }.compact_blank + # # => { b: 1, f: true } + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#235 + def compact_blank; end + + # The negative of the Enumerable#include?. Returns +true+ if the + # collection does not include the object. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#169 + def exclude?(object); end + + # Returns a copy of the enumerable excluding the specified elements. + # + # ["David", "Rafael", "Aaron", "Todd"].excluding "Aaron", "Todd" + # # => ["David", "Rafael"] + # + # ["David", "Rafael", "Aaron", "Todd"].excluding %w[ Aaron Todd ] + # # => ["David", "Rafael"] + # + # {foo: 1, bar: 2, baz: 3}.excluding :bar + # # => {foo: 1, baz: 3} + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#183 + def excluding(*elements); end + + # Returns a new +Array+ where the order has been set to that provided in the +series+, based on the +key+ of the + # objects in the original enumerable. + # + # [ Person.find(5), Person.find(3), Person.find(1) ].in_order_of(:id, [ 1, 5, 3 ]) + # # => [ Person.find(1), Person.find(5), Person.find(3) ] + # + # If the +series+ include keys that have no corresponding element in the Enumerable, these are ignored. + # If the Enumerable has additional elements that aren't named in the +series+, these are not included in the result. + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#247 + def in_order_of(key, series); end + + # Returns a new array that includes the passed elements. + # + # [ 1, 2, 3 ].including(4, 5) + # # => [ 1, 2, 3, 4, 5 ] + # + # ["David", "Rafael"].including %w[ Aaron Todd ] + # # => ["David", "Rafael", "Aaron", "Todd"] + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#163 + def including(*elements); end + + # Convert an enumerable to a hash, using the block result as the key and the + # element as the value. + # + # people.index_by(&:login) + # # => { "nextangle" => , "chade-" => , ...} + # + # people.index_by { |person| "#{person.first_name} #{person.last_name}" } + # # => { "Chade- Fowlersburg-e" => , "David Heinemeier Hansson" => , ...} + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#103 + def index_by; end + + # Convert an enumerable to a hash, using the element as the key and the block + # result as the value. + # + # post = Post.new(title: "hey there", body: "what's up?") + # + # %i( title body ).index_with { |attr_name| post.public_send(attr_name) } + # # => { title: "hey there", body: "what's up?" } + # + # If an argument is passed instead of a block, it will be used as the value + # for all elements: + # + # %i( created_at updated_at ).index_with(Time.now) + # # => { created_at: 2020-03-09 22:31:47, updated_at: 2020-03-09 22:31:47 } + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#126 + def index_with(default = T.unsafe(nil)); end + + # Returns +true+ if the enumerable has more than 1 element. Functionally + # equivalent to enum.to_a.size > 1. Can be called with a block too, + # much like any?, so people.many? { |p| p.age > 26 } returns +true+ + # if more than one person is over 26. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#144 + def many?; end + + # Calculates the maximum from the extracted elements. + # + # payments = [Payment.new(5), Payment.new(15), Payment.new(10)] + # payments.maximum(:price) # => 15 + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#52 + def maximum(key); end + + # Calculates the minimum from the extracted elements. + # + # payments = [Payment.new(5), Payment.new(15), Payment.new(10)] + # payments.minimum(:price) # => 5 + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#44 + def minimum(key); end + + # Extract the given key from the first element in the enumerable. + # + # [{ name: "David" }, { name: "Rafael" }, { name: "Aaron" }].pick(:name) + # # => "David" + # + # [{ id: 1, name: "David" }, { id: 2, name: "Rafael" }].pick(:id, :name) + # # => [1, "David"] + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#212 + def pick(*keys); end + + # Extract the given key from each element in the enumerable. + # + # [{ name: "David" }, { name: "Rafael" }, { name: "Aaron" }].pluck(:name) + # # => ["David", "Rafael", "Aaron"] + # + # [{ id: 1, name: "David" }, { id: 2, name: "Rafael" }].pluck(:id, :name) + # # => [[1, "David"], [2, "Rafael"]] + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#196 + def pluck(*keys); end + + # Returns the sole item in the enumerable. If there are no items, or more + # than one item, raises +Enumerable::SoleItemExpectedError+. + # + # ["x"].sole # => "x" + # Set.new.sole # => Enumerable::SoleItemExpectedError: no item found + # { a: 1, b: 2 }.sole # => Enumerable::SoleItemExpectedError: multiple items found + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#257 + def sole; end + + # Calculates a sum from the elements. + # + # payments.sum { |p| p.price * p.tax_rate } + # payments.sum(&:price) + # + # The latter is a shortcut for: + # + # payments.inject(0) { |sum, p| sum + p.price } + # + # It can also calculate the sum without the use of a block. + # + # [5, 15, 10].sum # => 30 + # ['foo', 'bar'].sum('') # => "foobar" + # [[1, 2], [3, 1, 5]].sum([]) # => [1, 2, 3, 1, 5] + # + # The default sum of an empty list is zero. You can override this default: + # + # [].sum(Payment.new(0)) { |i| i.amount } # => Payment.new(0) + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#74 + def sum(identity = T.unsafe(nil), &block); end + + # Returns a copy of the enumerable excluding the specified elements. + # + # ["David", "Rafael", "Aaron", "Todd"].excluding "Aaron", "Todd" + # # => ["David", "Rafael"] + # + # ["David", "Rafael", "Aaron", "Todd"].excluding %w[ Aaron Todd ] + # # => ["David", "Rafael"] + # + # {foo: 1, bar: 2, baz: 3}.excluding :bar + # # => {foo: 1, baz: 3} + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#183 + def without(*elements); end +end + +# Error generated by +sole+ when called on an enumerable that doesn't have +# exactly one item. +# +# source://activesupport//lib/active_support/core_ext/enumerable.rb#21 +class Enumerable::SoleItemExpectedError < ::StandardError; end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#240 +class Exception + # source://activesupport//lib/active_support/core_ext/object/json.rb#241 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#61 +class FalseClass + # source://activesupport//lib/active_support/core_ext/object/json.rb#81 + def as_json(options = T.unsafe(nil)); end + + # +false+ is blank: + # + # false.blank? # => true + # + # @return [true] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#67 + def blank?; end + + # Returns +self+. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#34 + def to_param; end +end + +# source://activesupport//lib/active_support/core_ext/file/atomic.rb#5 +class File < ::IO + class << self + # Write to a file atomically. Useful for situations where you don't + # want other processes or threads to see half-written files. + # + # File.atomic_write('important.file') do |file| + # file.write('hello') + # end + # + # This method needs to create a temporary file. By default it will create it + # in the same directory as the destination file. If you don't like this + # behavior you can provide a different directory but it must be on the + # same physical filesystem as the file you're trying to write. + # + # File.atomic_write('/data/something.important', '/data/tmp') do |file| + # file.write('hello') + # end + # + # source://activesupport//lib/active_support/core_ext/file/atomic.rb#21 + def atomic_write(file_name, temp_dir = T.unsafe(nil)); end + + # Private utility method. + # + # source://activesupport//lib/active_support/core_ext/file/atomic.rb#56 + def probe_stat_in(dir); end + end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#110 +class Float < ::Numeric + # Encoding Infinity or NaN to JSON should return "null". The default returns + # "Infinity" or "NaN" which are not valid JSON. + # + # source://activesupport//lib/active_support/core_ext/object/json.rb#113 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#3 +class Hash + include ::Enumerable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#164 + def as_json(options = T.unsafe(nil)); end + + # Validates all keys in a hash match *valid_keys, raising + # +ArgumentError+ on a mismatch. + # + # Note that keys are treated differently than HashWithIndifferentAccess, + # meaning that string and symbol keys will not match. + # + # { name: 'Rob', years: '28' }.assert_valid_keys(:name, :age) # => raises "ArgumentError: Unknown key: :years. Valid keys are: :name, :age" + # { name: 'Rob', age: '28' }.assert_valid_keys('name', 'age') # => raises "ArgumentError: Unknown key: :name. Valid keys are: 'name', 'age'" + # { name: 'Rob', age: '28' }.assert_valid_keys(:name, :age) # => passes, raises nothing + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#48 + def assert_valid_keys(*valid_keys); end + + # Hash#reject has its own definition, so this needs one too. + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#268 + def compact_blank; end + + # Removes all blank values from the +Hash+ in place and returns self. + # Uses Object#blank? for determining if a value is blank. + # + # h = { a: "", b: 1, c: nil, d: [], e: false, f: true } + # h.compact_blank! + # # => { b: 1, f: true } + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#278 + def compact_blank!; end + + # Returns a deep copy of hash. + # + # hash = { a: { b: 'b' } } + # dup = hash.deep_dup + # dup[:a][:c] = 'c' + # + # hash[:a][:c] # => nil + # dup[:a][:c] # => "c" + # + # source://activesupport//lib/active_support/core_ext/object/deep_dup.rb#43 + def deep_dup; end + + # Returns a new hash with +self+ and +other_hash+ merged recursively. + # + # h1 = { a: true, b: { c: [1, 2, 3] } } + # h2 = { a: false, b: { x: [3, 4, 5] } } + # + # h1.deep_merge(h2) # => { a: false, b: { c: [1, 2, 3], x: [3, 4, 5] } } + # + # Like with Hash#merge in the standard library, a block can be provided + # to merge values: + # + # h1 = { a: 100, b: 200, c: { c1: 100 } } + # h2 = { b: 250, c: { c1: 200 } } + # h1.deep_merge(h2) { |key, this_val, other_val| this_val + other_val } + # # => { a: 100, b: 450, c: { c1: 300 } } + # + # source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#18 + def deep_merge(other_hash, &block); end + + # Same as +deep_merge+, but modifies +self+. + # + # source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#23 + def deep_merge!(other_hash, &block); end + + # Returns a new hash with all keys converted to strings. + # This includes the keys from the root hash and from all + # nested hashes and arrays. + # + # hash = { person: { name: 'Rob', age: '28' } } + # + # hash.deep_stringify_keys + # # => {"person"=>{"name"=>"Rob", "age"=>"28"}} + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#84 + def deep_stringify_keys; end + + # Destructively converts all keys to strings. + # This includes the keys from the root hash and from all + # nested hashes and arrays. + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#91 + def deep_stringify_keys!; end + + # Returns a new hash with all keys converted to symbols, as long as + # they respond to +to_sym+. This includes the keys from the root hash + # and from all nested hashes and arrays. + # + # hash = { 'person' => { 'name' => 'Rob', 'age' => '28' } } + # + # hash.deep_symbolize_keys + # # => {:person=>{:name=>"Rob", :age=>"28"}} + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#103 + def deep_symbolize_keys; end + + # Destructively converts all keys to symbols, as long as they respond + # to +to_sym+. This includes the keys from the root hash and from all + # nested hashes and arrays. + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#110 + def deep_symbolize_keys!; end + + # Returns a new hash with all keys converted by the block operation. + # This includes the keys from the root hash and from all + # nested hashes and arrays. + # + # hash = { person: { name: 'Rob', age: '28' } } + # + # hash.deep_transform_keys{ |key| key.to_s.upcase } + # # => {"PERSON"=>{"NAME"=>"Rob", "AGE"=>"28"}} + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#65 + def deep_transform_keys(&block); end + + # Destructively converts all keys by using the block operation. + # This includes the keys from the root hash and from all + # nested hashes and arrays. + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#72 + def deep_transform_keys!(&block); end + + # Removes the given keys from hash and returns it. + # hash = { a: true, b: false, c: nil } + # hash.except!(:c) # => { a: true, b: false } + # hash # => { a: true, b: false } + # + # source://activesupport//lib/active_support/core_ext/hash/except.rb#20 + def except!(*keys); end + + # Removes and returns the key/value pairs matching the given keys. + # + # hash = { a: 1, b: 2, c: 3, d: 4 } + # hash.extract!(:a, :b) # => {:a=>1, :b=>2} + # hash # => {:c=>3, :d=>4} + # + # source://activesupport//lib/active_support/core_ext/hash/slice.rb#24 + def extract!(*keys); end + + # By default, only instances of Hash itself are extractable. + # Subclasses of Hash may implement this method and return + # true to declare themselves as extractable. If a Hash + # is extractable, Array#extract_options! pops it from + # the Array when it is the last element of the Array. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/array/extract_options.rb#9 + def extractable_options?; end + + # Returns an ActiveSupport::HashWithIndifferentAccess out of its receiver: + # + # { a: 1 }.with_indifferent_access['a'] # => 1 + # Called when object is nested under an object that receives + # #with_indifferent_access. This method will be called on the current object + # by the enclosing object and is aliased to #with_indifferent_access by + # default. Subclasses of Hash may override this method to return +self+ if + # converting to an ActiveSupport::HashWithIndifferentAccess would not be + # desirable. + # + # b = { b: 1 } + # { a: b }.with_indifferent_access['a'] # calls b.nested_under_indifferent_access + # # => {"b"=>1} + # + # source://activesupport//lib/active_support/core_ext/hash/indifferent_access.rb#9 + def nested_under_indifferent_access; end + + # Merges the caller into +other_hash+. For example, + # + # options = options.reverse_merge(size: 25, velocity: 10) + # + # is equivalent to + # + # options = { size: 25, velocity: 10 }.merge(options) + # + # This is particularly useful for initializing an options hash + # with default values. + # + # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#14 + def reverse_merge(other_hash); end + + # Destructive +reverse_merge+. + # + # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#20 + def reverse_merge!(other_hash); end + + # Destructive +reverse_merge+. + # + # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#20 + def reverse_update(other_hash); end + + # Replaces the hash with only the given keys. + # Returns a hash containing the removed key/value pairs. + # + # hash = { a: 1, b: 2, c: 3, d: 4 } + # hash.slice!(:a, :b) # => {:c=>3, :d=>4} + # hash # => {:a=>1, :b=>2} + # + # source://activesupport//lib/active_support/core_ext/hash/slice.rb#10 + def slice!(*keys); end + + # Returns a new hash with all keys converted to strings. + # + # hash = { name: 'Rob', age: '28' } + # + # hash.stringify_keys + # # => {"name"=>"Rob", "age"=>"28"} + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#10 + def stringify_keys; end + + # Destructively converts all keys to strings. Same as + # +stringify_keys+, but modifies +self+. + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#16 + def stringify_keys!; end + + # Returns a new hash with all keys converted to symbols, as long as + # they respond to +to_sym+. + # + # hash = { 'name' => 'Rob', 'age' => '28' } + # + # hash.symbolize_keys + # # => {:name=>"Rob", :age=>"28"} + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#27 + def symbolize_keys; end + + # Destructively converts all keys to symbols, as long as they respond + # to +to_sym+. Same as +symbolize_keys+, but modifies +self+. + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#34 + def symbolize_keys!; end + + # Returns a new hash with all keys converted to symbols, as long as + # they respond to +to_sym+. + # + # hash = { 'name' => 'Rob', 'age' => '28' } + # + # hash.symbolize_keys + # # => {:name=>"Rob", :age=>"28"} + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#27 + def to_options; end + + # Destructively converts all keys to symbols, as long as they respond + # to +to_sym+. Same as +symbolize_keys+, but modifies +self+. + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#34 + def to_options!; end + + # Returns a string representation of the receiver suitable for use as a URL + # query string: + # + # {name: 'David', nationality: 'Danish'}.to_query + # # => "name=David&nationality=Danish" + # + # An optional namespace can be passed to enclose key names: + # + # {name: 'David', nationality: 'Danish'}.to_query('user') + # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" + # + # The string pairs "key=value" that conform the query string + # are sorted lexicographically in ascending order. + # + # This method is also aliased as +to_param+. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#77 + def to_param(namespace = T.unsafe(nil)); end + + # Returns a string representation of the receiver suitable for use as a URL + # query string: + # + # {name: 'David', nationality: 'Danish'}.to_query + # # => "name=David&nationality=Danish" + # + # An optional namespace can be passed to enclose key names: + # + # {name: 'David', nationality: 'Danish'}.to_query('user') + # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" + # + # The string pairs "key=value" that conform the query string + # are sorted lexicographically in ascending order. + # + # This method is also aliased as +to_param+. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#77 + def to_query(namespace = T.unsafe(nil)); end + + # Returns a string containing an XML representation of its receiver: + # + # { foo: 1, bar: 2 }.to_xml + # # => + # # + # # + # # 1 + # # 2 + # # + # + # To do so, the method loops over the pairs and builds nodes that depend on + # the _values_. Given a pair +key+, +value+: + # + # * If +value+ is a hash there's a recursive call with +key+ as :root. + # + # * If +value+ is an array there's a recursive call with +key+ as :root, + # and +key+ singularized as :children. + # + # * If +value+ is a callable object it must expect one or two arguments. Depending + # on the arity, the callable is invoked with the +options+ hash as first argument + # with +key+ as :root, and +key+ singularized as second argument. The + # callable can add nodes by using options[:builder]. + # + # {foo: lambda { |options, key| options[:builder].b(key) }}.to_xml + # # => "foo" + # + # * If +value+ responds to +to_xml+ the method is invoked with +key+ as :root. + # + # class Foo + # def to_xml(options) + # options[:builder].bar 'fooing!' + # end + # end + # + # { foo: Foo.new }.to_xml(skip_instruct: true) + # # => + # # + # # fooing! + # # + # + # * Otherwise, a node with +key+ as tag is created with a string representation of + # +value+ as text node. If +value+ is +nil+ an attribute "nil" set to "true" is added. + # Unless the option :skip_types exists and is true, an attribute "type" is + # added as well according to the following mapping: + # + # XML_TYPE_NAMES = { + # "Symbol" => "symbol", + # "Integer" => "integer", + # "BigDecimal" => "decimal", + # "Float" => "float", + # "TrueClass" => "boolean", + # "FalseClass" => "boolean", + # "Date" => "date", + # "DateTime" => "dateTime", + # "Time" => "dateTime" + # } + # + # By default the root node is "hash", but that's configurable via the :root option. + # + # The default XML builder is a fresh instance of Builder::XmlMarkup. You can + # configure your own builder with the :builder option. The method also accepts + # options like :dasherize and friends, they are forwarded to the builder. + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#74 + def to_xml(options = T.unsafe(nil)); end + + # Merges the caller into +other_hash+. For example, + # + # options = options.reverse_merge(size: 25, velocity: 10) + # + # is equivalent to + # + # options = { size: 25, velocity: 10 }.merge(options) + # + # This is particularly useful for initializing an options hash + # with default values. + # + # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#14 + def with_defaults(other_hash); end + + # Destructive +reverse_merge+. + # + # source://activesupport//lib/active_support/core_ext/hash/reverse_merge.rb#20 + def with_defaults!(other_hash); end + + # Returns an ActiveSupport::HashWithIndifferentAccess out of its receiver: + # + # { a: 1 }.with_indifferent_access['a'] # => 1 + # + # source://activesupport//lib/active_support/core_ext/hash/indifferent_access.rb#9 + def with_indifferent_access; end + + private + + # Support methods for deep transforming nested hashes and arrays. + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#116 + def _deep_transform_keys_in_object(object, &block); end + + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#129 + def _deep_transform_keys_in_object!(object, &block); end + + class << self + # Builds a Hash from XML just like Hash.from_xml, but also allows Symbol and YAML. + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#133 + def from_trusted_xml(xml); end + + # Returns a Hash containing a collection of pairs when the key is the node name and the value is + # its content + # + # xml = <<-XML + # + # + # 1 + # 2 + # + # XML + # + # hash = Hash.from_xml(xml) + # # => {"hash"=>{"foo"=>1, "bar"=>2}} + # + # +DisallowedType+ is raised if the XML contains attributes with type="yaml" or + # type="symbol". Use Hash.from_trusted_xml to + # parse this XML. + # + # Custom +disallowed_types+ can also be passed in the form of an + # array. + # + # xml = <<-XML + # + # + # 1 + # "David" + # + # XML + # + # hash = Hash.from_xml(xml, ['integer']) + # # => ActiveSupport::XMLConverter::DisallowedType: Disallowed type attribute: "integer" + # + # Note that passing custom disallowed types will override the default types, + # which are Symbol and YAML. + # + # source://activesupport//lib/active_support/core_ext/hash/conversions.rb#128 + def from_xml(xml, disallowed_types = T.unsafe(nil)); end + end +end + +# :stopdoc: +# +# source://activesupport//lib/active_support/hash_with_indifferent_access.rb#425 +HashWithIndifferentAccess = ActiveSupport::HashWithIndifferentAccess + +# :enddoc: +# +# source://activesupport//lib/active_support/i18n_railtie.rb#8 +module I18n + class << self + # source://i18n/1.12.0/lib/i18n/backend/cache.rb#64 + def cache_key_digest; end + + # source://i18n/1.12.0/lib/i18n/backend/cache.rb#68 + def cache_key_digest=(key_digest); end + + # source://i18n/1.12.0/lib/i18n/backend/cache.rb#56 + def cache_namespace; end + + # source://i18n/1.12.0/lib/i18n/backend/cache.rb#60 + def cache_namespace=(namespace); end + + # source://i18n/1.12.0/lib/i18n/backend/cache.rb#48 + def cache_store; end + + # source://i18n/1.12.0/lib/i18n/backend/cache.rb#52 + def cache_store=(store); end + + # source://i18n/1.12.0/lib/i18n/backend/fallbacks.rb#17 + def fallbacks; end + + # source://i18n/1.12.0/lib/i18n/backend/fallbacks.rb#23 + def fallbacks=(fallbacks); end + + # source://i18n/1.12.0/lib/i18n/interpolate/ruby.rb#16 + def interpolate(string, values); end + + # source://i18n/1.12.0/lib/i18n/interpolate/ruby.rb#22 + def interpolate_hash(string, values); end + + # source://i18n/1.12.0/lib/i18n.rb#37 + def new_double_nested_cache; end + + # source://i18n/1.12.0/lib/i18n/backend/cache.rb#72 + def perform_caching?; end + + # source://i18n/1.12.0/lib/i18n.rb#45 + def reserve_key(key); end + + # source://i18n/1.12.0/lib/i18n.rb#50 + def reserved_keys_pattern; end + end +end + +# source://activesupport//lib/active_support/i18n_railtie.rb#9 +class I18n::Railtie < ::Rails::Railtie + class << self + # source://activesupport//lib/active_support/i18n_railtie.rb#78 + def forward_raise_on_missing_translations_config(app); end + + # source://activesupport//lib/active_support/i18n_railtie.rb#88 + def include_fallbacks_module; end + + # source://activesupport//lib/active_support/i18n_railtie.rb#92 + def init_fallbacks(fallbacks); end + + # Setup i18n configuration. + # + # source://activesupport//lib/active_support/i18n_railtie.rb#32 + def initialize_i18n(app); end + + # source://activesupport//lib/active_support/i18n_railtie.rb#108 + def validate_fallbacks(fallbacks); end + + # source://activesupport//lib/active_support/i18n_railtie.rb#119 + def watched_dirs_with_extensions(paths); end + end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#145 +class IO + include ::Enumerable + include ::File::Constants + + # source://activesupport//lib/active_support/core_ext/object/json.rb#146 + def as_json(options = T.unsafe(nil)); end +end + +class IO::Buffer + include ::Comparable + + def initialize(*_arg0); end + + def <=>(_arg0); end + def clear(*_arg0); end + def copy(*_arg0); end + def empty?; end + def external?; end + def free; end + def get_string(*_arg0); end + def get_value(_arg0, _arg1); end + def hexdump; end + def inspect; end + def internal?; end + def locked; end + def locked?; end + def mapped?; end + def null?; end + def pread(_arg0, _arg1, _arg2); end + def pwrite(_arg0, _arg1, _arg2); end + def read(_arg0, _arg1); end + def readonly?; end + def resize(_arg0); end + def set_string(*_arg0); end + def set_value(_arg0, _arg1, _arg2); end + def size; end + def slice(_arg0, _arg1); end + def to_s; end + def transfer; end + def valid?; end + def write(_arg0, _arg1); end + + class << self + def for(_arg0); end + def map(*_arg0); end + end +end + +class IO::Buffer::AccessError < ::RuntimeError; end +class IO::Buffer::AllocationError < ::RuntimeError; end +IO::Buffer::BIG_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::DEFAULT_SIZE = T.let(T.unsafe(nil), Integer) +IO::Buffer::EXTERNAL = T.let(T.unsafe(nil), Integer) +IO::Buffer::HOST_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::INTERNAL = T.let(T.unsafe(nil), Integer) +class IO::Buffer::InvalidatedError < ::RuntimeError; end +IO::Buffer::LITTLE_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::LOCKED = T.let(T.unsafe(nil), Integer) +class IO::Buffer::LockedError < ::RuntimeError; end +IO::Buffer::MAPPED = T.let(T.unsafe(nil), Integer) +IO::Buffer::NETWORK_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::PAGE_SIZE = T.let(T.unsafe(nil), Integer) +IO::Buffer::PRIVATE = T.let(T.unsafe(nil), Integer) +IO::Buffer::READONLY = T.let(T.unsafe(nil), Integer) + +class IO::ConsoleMode + def echo=(_arg0); end + def raw(*_arg0); end + def raw!(*_arg0); end + + private + + def initialize_copy(_arg0); end +end + +class IO::EAGAINWaitReadable < ::Errno::EAGAIN + include ::IO::WaitReadable +end + +class IO::EAGAINWaitWritable < ::Errno::EAGAIN + include ::IO::WaitWritable +end + +class IO::EINPROGRESSWaitReadable < ::Errno::EINPROGRESS + include ::IO::WaitReadable +end + +class IO::EINPROGRESSWaitWritable < ::Errno::EINPROGRESS + include ::IO::WaitWritable +end + +IO::EWOULDBLOCKWaitReadable = IO::EAGAINWaitReadable +IO::EWOULDBLOCKWaitWritable = IO::EAGAINWaitWritable +IO::PRIORITY = T.let(T.unsafe(nil), Integer) +IO::READABLE = T.let(T.unsafe(nil), Integer) +IO::WRITABLE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/object/json.rb#228 +class IPAddr + # source://activesupport//lib/active_support/core_ext/object/json.rb#229 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/integer/time.rb#6 +class Integer < ::Numeric + # 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 + +Integer::GMP_VERSION = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#3 +module Kernel + private + + # Sets $VERBOSE to +true+ for the duration of the block and back to its + # original value afterwards. + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#20 + def enable_warnings(&block); end + + # Sets $VERBOSE to +nil+ for the duration of the block and back to its original + # value afterwards. + # + # silence_warnings do + # value = noisy_call # no warning voiced + # end + # + # noisy_call # warning voiced + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#14 + def silence_warnings(&block); end + + # Blocks and ignores any exception passed as argument if raised within the block. + # + # suppress(ZeroDivisionError) do + # 1/0 + # puts 'This code is NOT reached' + # end + # + # puts 'This code gets executed and nothing related to ZeroDivisionError was seen' + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#41 + def suppress(*exception_classes); end + + # Sets $VERBOSE for the duration of the block and back to its original + # value afterwards. + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#26 + def with_warnings(flag); end + + class << self + # Sets $VERBOSE to +true+ for the duration of the block and back to its + # original value afterwards. + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#20 + def enable_warnings(&block); end + + # Sets $VERBOSE to +nil+ for the duration of the block and back to its original + # value afterwards. + # + # silence_warnings do + # value = noisy_call # no warning voiced + # end + # + # noisy_call # warning voiced + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#14 + def silence_warnings(&block); end + + # Blocks and ignores any exception passed as argument if raised within the block. + # + # suppress(ZeroDivisionError) do + # 1/0 + # puts 'This code is NOT reached' + # end + # + # puts 'This code gets executed and nothing related to ZeroDivisionError was seen' + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#41 + def suppress(*exception_classes); end + + # Sets $VERBOSE for the duration of the block and back to its original + # value afterwards. + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#26 + def with_warnings(flag); end + end +end + +# source://activesupport//lib/active_support/core_ext/load_error.rb#3 +class LoadError < ::ScriptError + include ::DidYouMean::Correctable + + # Returns true if the given path name (except perhaps for the ".rb" + # extension) is the missing file which caused the exception to be raised. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/load_error.rb#6 + def is_missing?(location); end +end + +# source://activesupport//lib/active_support/core_ext/object/duplicable.rb#31 +class Method + # Methods are not duplicable: + # + # method(:puts).duplicable? # => false + # method(:puts).dup # => TypeError: allocator undefined for Method + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#36 + def duplicable?; end +end + +# == Attribute Accessors per Thread +# +# Extends the module object with class/module and instance accessors for +# class/module attributes, just like the native attr* accessors for instance +# attributes, but does so on a per-thread basis. +# +# So the values are scoped within the Thread.current space under the class name +# of the module. +# +# Note that it can also be scoped per-fiber if +Rails.application.config.active_support.isolation_level+ +# is set to +:fiber+. +# +# source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#8 +class Module + include ::Module::Concerning + + # Allows you to make aliases for attributes, which includes + # getter, setter, and a predicate. + # + # class Content < ActiveRecord::Base + # # has a title attribute + # end + # + # class Email < Content + # alias_attribute :subject, :title + # end + # + # e = Email.find(1) + # e.title # => "Superstars" + # e.subject # => "Superstars" + # e.subject? # => true + # e.subject = "Megastars" + # e.title # => "Megastars" + # + # source://activesupport//lib/active_support/core_ext/module/aliasing.rb#21 + def alias_attribute(new_name, old_name); end + + # A module may or may not have a name. + # + # module M; end + # M.name # => "M" + # + # m = Module.new + # m.name # => nil + # + # +anonymous?+ method returns true if module does not have a name, false otherwise: + # + # Module.new.anonymous? # => true + # + # module M; end + # M.anonymous? # => false + # + # A module gets a name when it is first assigned to a constant. Either + # via the +module+ or +class+ keyword or by an explicit assignment: + # + # m = Module.new # creates an anonymous module + # m.anonymous? # => true + # M = m # m gets a name here as a side-effect + # m.name # => "M" + # m.anonymous? # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/module/anonymous.rb#27 + def anonymous?; end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#53 + def as_json(options = T.unsafe(nil)); end + + # Declares an attribute reader and writer backed by an internally-named instance + # variable. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#16 + def attr_internal(*attrs); end + + # Declares an attribute reader and writer backed by an internally-named instance + # variable. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#16 + def attr_internal_accessor(*attrs); end + + # Declares an attribute reader backed by an internally-named instance variable. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#5 + def attr_internal_reader(*attrs); end + + # Declares an attribute writer backed by an internally-named instance variable. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#10 + def attr_internal_writer(*attrs); end + + # Defines both class and instance accessors for class attributes. + # All class and instance methods created will be public, even if + # this method is called with a private or protected access modifier. + # + # module HairColors + # mattr_accessor :hair_colors + # end + # + # class Person + # include HairColors + # end + # + # HairColors.hair_colors = [:brown, :black, :blonde, :red] + # HairColors.hair_colors # => [:brown, :black, :blonde, :red] + # Person.new.hair_colors # => [:brown, :black, :blonde, :red] + # + # If a subclass changes the value then that would also change the value for + # parent class. Similarly if parent class changes the value then that would + # change the value of subclasses too. + # + # class Citizen < Person + # end + # + # Citizen.new.hair_colors << :blue + # Person.new.hair_colors # => [:brown, :black, :blonde, :red, :blue] + # + # To omit the instance writer method, pass instance_writer: false. + # To omit the instance reader method, pass instance_reader: false. + # + # module HairColors + # mattr_accessor :hair_colors, instance_writer: false, instance_reader: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:brown] # => NoMethodError + # Person.new.hair_colors # => NoMethodError + # + # Or pass instance_accessor: false, to omit both instance methods. + # + # module HairColors + # mattr_accessor :hair_colors, instance_accessor: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:brown] # => NoMethodError + # Person.new.hair_colors # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_accessor :hair_colors, default: [:brown, :black, :blonde, :red] + # end + # + # class Person + # include HairColors + # end + # + # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#202 + def cattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), &blk); end + + # Defines a class attribute and creates a class and instance reader methods. + # The underlying class variable is set to +nil+, if it is not previously + # defined. All class and instance methods created will be public, even if + # this method is called with a private or protected access modifier. + # + # module HairColors + # mattr_reader :hair_colors + # end + # + # HairColors.hair_colors # => nil + # HairColors.class_variable_set("@@hair_colors", [:brown, :black]) + # HairColors.hair_colors # => [:brown, :black] + # + # The attribute name must be a valid method name in Ruby. + # + # module Foo + # mattr_reader :"1_Badname" + # end + # # => NameError: invalid attribute name: 1_Badname + # + # To omit the instance reader method, pass + # instance_reader: false or instance_accessor: false. + # + # module HairColors + # mattr_reader :hair_colors, instance_reader: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_reader :hair_colors, default: [:brown, :black, :blonde, :red] + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors # => [:brown, :black, :blonde, :red] + # + # @raise [TypeError] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#53 + def cattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + + # Defines a class attribute and creates a class and instance writer methods to + # allow assignment to the attribute. All class and instance methods created + # will be public, even if this method is called with a private or protected + # access modifier. + # + # module HairColors + # mattr_writer :hair_colors + # end + # + # class Person + # include HairColors + # end + # + # HairColors.hair_colors = [:brown, :black] + # Person.class_variable_get("@@hair_colors") # => [:brown, :black] + # Person.new.hair_colors = [:blonde, :red] + # HairColors.class_variable_get("@@hair_colors") # => [:blonde, :red] + # + # To omit the instance writer method, pass + # instance_writer: false or instance_accessor: false. + # + # module HairColors + # mattr_writer :hair_colors, instance_writer: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:blonde, :red] # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] + # end + # + # class Person + # include HairColors + # end + # + # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # + # @raise [TypeError] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#117 + def cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + + # Provides a +delegate+ class method to easily expose contained objects' + # public methods as your own. + # + # ==== Options + # * :to - Specifies the target object name as a symbol or string + # * :prefix - Prefixes the new method with the target name or a custom prefix + # * :allow_nil - If set to true, prevents a +Module::DelegationError+ + # from being raised + # * :private - If set to true, changes method visibility to private + # + # The macro receives one or more method names (specified as symbols or + # strings) and the name of the target object via the :to option + # (also a symbol or string). + # + # Delegation is particularly useful with Active Record associations: + # + # class Greeter < ActiveRecord::Base + # def hello + # 'hello' + # end + # + # def goodbye + # 'goodbye' + # end + # end + # + # class Foo < ActiveRecord::Base + # belongs_to :greeter + # delegate :hello, to: :greeter + # end + # + # Foo.new.hello # => "hello" + # Foo.new.goodbye # => NoMethodError: undefined method `goodbye' for # + # + # Multiple delegates to the same target are allowed: + # + # class Foo < ActiveRecord::Base + # belongs_to :greeter + # delegate :hello, :goodbye, to: :greeter + # end + # + # Foo.new.goodbye # => "goodbye" + # + # Methods can be delegated to instance variables, class variables, or constants + # by providing them as a symbols: + # + # class Foo + # CONSTANT_ARRAY = [0,1,2,3] + # @@class_array = [4,5,6,7] + # + # def initialize + # @instance_array = [8,9,10,11] + # end + # delegate :sum, to: :CONSTANT_ARRAY + # delegate :min, to: :@@class_array + # delegate :max, to: :@instance_array + # end + # + # Foo.new.sum # => 6 + # Foo.new.min # => 4 + # Foo.new.max # => 11 + # + # It's also possible to delegate a method to the class by using +:class+: + # + # class Foo + # def self.hello + # "world" + # end + # + # delegate :hello, to: :class + # end + # + # Foo.new.hello # => "world" + # + # Delegates can optionally be prefixed using the :prefix option. If the value + # is true, the delegate methods are prefixed with the name of the object being + # delegated to. + # + # Person = Struct.new(:name, :address) + # + # class Invoice < Struct.new(:client) + # delegate :name, :address, to: :client, prefix: true + # end + # + # john_doe = Person.new('John Doe', 'Vimmersvej 13') + # invoice = Invoice.new(john_doe) + # invoice.client_name # => "John Doe" + # invoice.client_address # => "Vimmersvej 13" + # + # It is also possible to supply a custom prefix. + # + # class Invoice < Struct.new(:client) + # delegate :name, :address, to: :client, prefix: :customer + # end + # + # invoice = Invoice.new(john_doe) + # invoice.customer_name # => 'John Doe' + # invoice.customer_address # => 'Vimmersvej 13' + # + # The delegated methods are public by default. + # Pass private: true to change that. + # + # class User < ActiveRecord::Base + # has_one :profile + # delegate :first_name, to: :profile + # delegate :date_of_birth, to: :profile, private: true + # + # def age + # Date.today.year - date_of_birth.year + # end + # end + # + # User.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 + # +Module::DelegationError+ is raised. If you wish to instead return +nil+, + # use the :allow_nil option. + # + # class User < ActiveRecord::Base + # has_one :profile + # delegate :age, to: :profile + # end + # + # User.new.age + # # => Module::DelegationError: User#age delegated to profile.age, but profile is nil + # + # But if not having a profile yet is fine and should not be an error + # condition: + # + # class User < ActiveRecord::Base + # has_one :profile + # delegate :age, to: :profile, allow_nil: true + # end + # + # User.new.age # nil + # + # Note that if the target is not +nil+ then the call is attempted regardless of the + # :allow_nil option, and thus an exception is still raised if said object + # does not respond to the method: + # + # class Foo + # def initialize(bar) + # @bar = bar + # end + # + # delegate :name, to: :@bar, allow_nil: true + # end + # + # Foo.new("Bar").name # raises NoMethodError: undefined method `name' + # + # The target method must be public, otherwise it will raise +NoMethodError+. + # + # source://activesupport//lib/active_support/core_ext/module/delegation.rb#171 + def delegate(*methods, to: T.unsafe(nil), prefix: T.unsafe(nil), allow_nil: T.unsafe(nil), private: T.unsafe(nil)); end + + # When building decorators, a common pattern may emerge: + # + # class Partition + # def initialize(event) + # @event = event + # end + # + # def person + # detail.person || creator + # end + # + # private + # def respond_to_missing?(name, include_private = false) + # @event.respond_to?(name, include_private) + # end + # + # def method_missing(method, *args, &block) + # @event.send(method, *args, &block) + # end + # end + # + # With Module#delegate_missing_to, the above is condensed to: + # + # class Partition + # delegate_missing_to :@event + # + # def initialize(event) + # @event = event + # end + # + # def person + # detail.person || creator + # end + # end + # + # The target can be anything callable within the object, e.g. instance + # variables, methods, constants, etc. + # + # The delegated method must be public on the target, otherwise it will + # raise +DelegationError+. If you wish to instead return +nil+, + # use the :allow_nil option. + # + # The marshal_dump and _dump methods are exempt from + # delegation due to possible interference when calling + # Marshal.dump(object), should the delegation target method + # of object add or remove instance variables. + # + # source://activesupport//lib/active_support/core_ext/module/delegation.rb#289 + def delegate_missing_to(target, allow_nil: T.unsafe(nil)); end + + # deprecate :foo + # deprecate bar: 'message' + # deprecate :foo, :bar, baz: 'warning!', qux: 'gone!' + # + # You can also use custom deprecator instance: + # + # deprecate :foo, deprecator: MyLib::Deprecator.new + # deprecate :foo, bar: "warning!", deprecator: MyLib::Deprecator.new + # + # \Custom deprecators must respond to deprecation_warning(deprecated_method_name, message, caller_backtrace) + # method where you can implement your custom warning behavior. + # + # class MyLib::Deprecator + # def deprecation_warning(deprecated_method_name, message, caller_backtrace = nil) + # message = "#{deprecated_method_name} is deprecated and will be removed from MyLibrary | #{message}" + # Kernel.warn message + # end + # end + # + # source://activesupport//lib/active_support/core_ext/module/deprecation.rb#22 + def deprecate(*method_names); end + + # Defines both class and instance accessors for class attributes. + # All class and instance methods created will be public, even if + # this method is called with a private or protected access modifier. + # + # module HairColors + # mattr_accessor :hair_colors + # end + # + # class Person + # include HairColors + # end + # + # HairColors.hair_colors = [:brown, :black, :blonde, :red] + # HairColors.hair_colors # => [:brown, :black, :blonde, :red] + # Person.new.hair_colors # => [:brown, :black, :blonde, :red] + # + # If a subclass changes the value then that would also change the value for + # parent class. Similarly if parent class changes the value then that would + # change the value of subclasses too. + # + # class Citizen < Person + # end + # + # Citizen.new.hair_colors << :blue + # Person.new.hair_colors # => [:brown, :black, :blonde, :red, :blue] + # + # To omit the instance writer method, pass instance_writer: false. + # To omit the instance reader method, pass instance_reader: false. + # + # module HairColors + # mattr_accessor :hair_colors, instance_writer: false, instance_reader: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:brown] # => NoMethodError + # Person.new.hair_colors # => NoMethodError + # + # Or pass instance_accessor: false, to omit both instance methods. + # + # module HairColors + # mattr_accessor :hair_colors, instance_accessor: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:brown] # => NoMethodError + # Person.new.hair_colors # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_accessor :hair_colors, default: [:brown, :black, :blonde, :red] + # end + # + # class Person + # include HairColors + # end + # + # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#202 + def mattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), &blk); end + + # Defines a class attribute and creates a class and instance reader methods. + # The underlying class variable is set to +nil+, if it is not previously + # defined. All class and instance methods created will be public, even if + # this method is called with a private or protected access modifier. + # + # module HairColors + # mattr_reader :hair_colors + # end + # + # HairColors.hair_colors # => nil + # HairColors.class_variable_set("@@hair_colors", [:brown, :black]) + # HairColors.hair_colors # => [:brown, :black] + # + # The attribute name must be a valid method name in Ruby. + # + # module Foo + # mattr_reader :"1_Badname" + # end + # # => NameError: invalid attribute name: 1_Badname + # + # To omit the instance reader method, pass + # instance_reader: false or instance_accessor: false. + # + # module HairColors + # mattr_reader :hair_colors, instance_reader: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_reader :hair_colors, default: [:brown, :black, :blonde, :red] + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors # => [:brown, :black, :blonde, :red] + # + # @raise [TypeError] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#53 + def mattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + + # Defines a class attribute and creates a class and instance writer methods to + # allow assignment to the attribute. All class and instance methods created + # will be public, even if this method is called with a private or protected + # access modifier. + # + # module HairColors + # mattr_writer :hair_colors + # end + # + # class Person + # include HairColors + # end + # + # HairColors.hair_colors = [:brown, :black] + # Person.class_variable_get("@@hair_colors") # => [:brown, :black] + # Person.new.hair_colors = [:blonde, :red] + # HairColors.class_variable_get("@@hair_colors") # => [:blonde, :red] + # + # To omit the instance writer method, pass + # instance_writer: false or instance_accessor: false. + # + # module HairColors + # mattr_writer :hair_colors, instance_writer: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:blonde, :red] # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] + # end + # + # class Person + # include HairColors + # end + # + # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # + # @raise [TypeError] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#117 + def mattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#30 + def method_visibility(method); end + + # Returns the module which contains this one according to its name. + # + # module M + # module N + # end + # end + # X = M::N + # + # M::N.module_parent # => M + # X.module_parent # => M + # + # The parent of top-level and anonymous modules is Object. + # + # M.module_parent # => Object + # Module.new.module_parent # => Object + # + # source://activesupport//lib/active_support/core_ext/module/introspection.rb#35 + def module_parent; end + + # Returns the name of the module containing this one. + # + # M::N.module_parent_name # => "M" + # + # source://activesupport//lib/active_support/core_ext/module/introspection.rb#10 + def module_parent_name; end + + # Returns all the parents of this module according to its name, ordered from + # nested outwards. The receiver is not contained within the result. + # + # module M + # module N + # end + # end + # X = M::N + # + # M.module_parents # => [Object] + # M::N.module_parents # => [M, Object] + # X.module_parents # => [M, Object] + # + # source://activesupport//lib/active_support/core_ext/module/introspection.rb#51 + def module_parents; end + + # Replaces the existing method definition, if there is one, with the passed + # block as its body. + # + # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#17 + def redefine_method(method, &block); end + + # Replaces the existing singleton method definition, if there is one, with + # the passed block as its body. + # + # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#26 + def redefine_singleton_method(method, &block); end + + # Removes the named method, if it exists. + # + # source://activesupport//lib/active_support/core_ext/module/remove_method.rb#7 + def remove_possible_method(method); end + + # Removes the named singleton method, if it exists. + # + # source://activesupport//lib/active_support/core_ext/module/remove_method.rb#14 + def remove_possible_singleton_method(method); end + + # Marks the named method as intended to be redefined, if it exists. + # Suppresses the Ruby method redefinition warning. Prefer + # #redefine_method where possible. + # + # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#7 + def silence_redefinition_of_method(method); end + + # Defines both class and instance accessors for class attributes. + # + # class Account + # thread_mattr_accessor :user + # end + # + # Account.user = "DHH" + # Account.user # => "DHH" + # Account.new.user # => "DHH" + # + # Unlike +mattr_accessor+, values are *not* shared with subclasses or parent classes. + # If a subclass changes the value, the parent class' value is not changed. + # If the parent class changes the value, the value of subclasses is not changed. + # + # class Customer < Account + # end + # + # Account.user # => "DHH" + # Customer.user # => nil + # Customer.user = "Rafael" + # Customer.user # => "Rafael" + # Account.user # => "DHH" + # + # To omit the instance writer method, pass instance_writer: false. + # To omit the instance reader method, pass instance_reader: false. + # + # class Current + # thread_mattr_accessor :user, instance_writer: false, instance_reader: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # Current.new.user # => NoMethodError + # + # Or pass instance_accessor: false, to omit both instance methods. + # + # class Current + # thread_mattr_accessor :user, instance_accessor: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # Current.new.user # => NoMethodError + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#152 + def thread_cattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # Defines a per-thread class attribute and creates class and instance reader methods. + # The underlying per-thread class variable is set to +nil+, if it is not previously defined. + # + # module Current + # thread_mattr_reader :user + # end + # + # Current.user = "DHH" + # Current.user # => "DHH" + # Thread.new { Current.user }.value # => nil + # + # The attribute name must be a valid method name in Ruby. + # + # module Foo + # thread_mattr_reader :"1_Badname" + # end + # # => NameError: invalid attribute name: 1_Badname + # + # To omit the instance reader method, pass + # instance_reader: false or instance_accessor: false. + # + # class Current + # thread_mattr_reader :user, instance_reader: false + # end + # + # Current.new.user # => NoMethodError + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#41 + def thread_cattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # Defines a per-thread class attribute and creates a class and instance writer methods to + # allow assignment to the attribute. + # + # module Current + # thread_mattr_writer :user + # end + # + # Current.user = "DHH" + # Thread.current[:attr_Current_user] # => "DHH" + # + # To omit the instance writer method, pass + # instance_writer: false or instance_accessor: false. + # + # class Current + # thread_mattr_writer :user, instance_writer: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#85 + def thread_cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # Defines both class and instance accessors for class attributes. + # + # class Account + # thread_mattr_accessor :user + # end + # + # Account.user = "DHH" + # Account.user # => "DHH" + # Account.new.user # => "DHH" + # + # Unlike +mattr_accessor+, values are *not* shared with subclasses or parent classes. + # If a subclass changes the value, the parent class' value is not changed. + # If the parent class changes the value, the value of subclasses is not changed. + # + # class Customer < Account + # end + # + # Account.user # => "DHH" + # Customer.user # => nil + # Customer.user = "Rafael" + # Customer.user # => "Rafael" + # Account.user # => "DHH" + # + # To omit the instance writer method, pass instance_writer: false. + # To omit the instance reader method, pass instance_reader: false. + # + # class Current + # thread_mattr_accessor :user, instance_writer: false, instance_reader: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # Current.new.user # => NoMethodError + # + # Or pass instance_accessor: false, to omit both instance methods. + # + # class Current + # thread_mattr_accessor :user, instance_accessor: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # Current.new.user # => NoMethodError + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#152 + def thread_mattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # Defines a per-thread class attribute and creates class and instance reader methods. + # The underlying per-thread class variable is set to +nil+, if it is not previously defined. + # + # module Current + # thread_mattr_reader :user + # end + # + # Current.user = "DHH" + # Current.user # => "DHH" + # Thread.new { Current.user }.value # => nil + # + # The attribute name must be a valid method name in Ruby. + # + # module Foo + # thread_mattr_reader :"1_Badname" + # end + # # => NameError: invalid attribute name: 1_Badname + # + # To omit the instance reader method, pass + # instance_reader: false or instance_accessor: false. + # + # class Current + # thread_mattr_reader :user, instance_reader: false + # end + # + # Current.new.user # => NoMethodError + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#41 + def thread_mattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # Defines a per-thread class attribute and creates a class and instance writer methods to + # allow assignment to the attribute. + # + # module Current + # thread_mattr_writer :user + # end + # + # Current.user = "DHH" + # Thread.current[:attr_Current_user] # => "DHH" + # + # To omit the instance writer method, pass + # instance_writer: false or instance_accessor: false. + # + # class Current + # thread_mattr_writer :user, instance_writer: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#85 + def thread_mattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#30 + def attr_internal_define(attr_name, type); end + + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#26 + def attr_internal_ivar_name(attr); end + + class << self + # Returns the value of attribute attr_internal_naming_format. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#22 + def attr_internal_naming_format; end + + # Sets the attribute attr_internal_naming_format + # + # @param value the value to set the attribute attr_internal_naming_format to. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#22 + def attr_internal_naming_format=(_arg0); end + end +end + +# = Bite-sized separation of concerns +# +# We often find ourselves with a medium-sized chunk of behavior that we'd +# like to extract, but only mix in to a single class. +# +# Extracting a plain old Ruby object to encapsulate it and collaborate or +# delegate to the original object is often a good choice, but when there's +# no additional state to encapsulate or we're making DSL-style declarations +# about the parent class, introducing new collaborators can obfuscate rather +# than simplify. +# +# The typical route is to just dump everything in a monolithic class, perhaps +# with a comment, as a least-bad alternative. Using modules in separate files +# means tedious sifting to get a big-picture view. +# +# = Dissatisfying ways to separate small concerns +# +# == Using comments: +# +# class Todo < ApplicationRecord +# # Other todo implementation +# # ... +# +# ## Event tracking +# has_many :events +# +# before_create :track_creation +# +# private +# def track_creation +# # ... +# end +# end +# +# == With an inline module: +# +# Noisy syntax. +# +# class Todo < ApplicationRecord +# # Other todo implementation +# # ... +# +# module EventTracking +# extend ActiveSupport::Concern +# +# included do +# has_many :events +# before_create :track_creation +# end +# +# private +# def track_creation +# # ... +# end +# end +# include EventTracking +# end +# +# == Mix-in noise exiled to its own file: +# +# Once our chunk of behavior starts pushing the scroll-to-understand-it +# boundary, we give in and move it to a separate file. At this size, the +# increased overhead can be a reasonable tradeoff even if it reduces our +# at-a-glance perception of how things work. +# +# class Todo < ApplicationRecord +# # Other todo implementation +# # ... +# +# include TodoEventTracking +# end +# +# = Introducing Module#concerning +# +# By quieting the mix-in noise, we arrive at a natural, low-ceremony way to +# separate bite-sized concerns. +# +# class Todo < ApplicationRecord +# # Other todo implementation +# # ... +# +# concerning :EventTracking do +# included do +# has_many :events +# before_create :track_creation +# end +# +# private +# def track_creation +# # ... +# end +# end +# end +# +# Todo.ancestors +# # => [Todo, Todo::EventTracking, ApplicationRecord, Object] +# +# This small step has some wonderful ripple effects. We can +# * grok the behavior of our class in one glance, +# * clean up monolithic junk-drawer classes by separating their concerns, and +# * stop leaning on protected/private for crude "this is internal stuff" modularity. +# +# === Prepending concerning +# +# concerning supports a prepend: true argument which will prepend the +# concern instead of using include for it. +# +# source://activesupport//lib/active_support/core_ext/module/concerning.rb#112 +module Module::Concerning + # A low-cruft shortcut to define a concern. + # + # concern :EventTracking do + # ... + # end + # + # is equivalent to + # + # module EventTracking + # extend ActiveSupport::Concern + # + # ... + # end + # + # source://activesupport//lib/active_support/core_ext/module/concerning.rb#132 + def concern(topic, &module_definition); end + + # Define a new concern and mix it in. + # + # source://activesupport//lib/active_support/core_ext/module/concerning.rb#114 + def concerning(topic, prepend: T.unsafe(nil), &block); end +end + +# source://activesupport//lib/active_support/core_ext/module/delegation.rb#13 +Module::DELEGATION_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/core_ext/module/delegation.rb#14 +Module::DELEGATION_RESERVED_METHOD_NAMES = T.let(T.unsafe(nil), Set) + +# Error generated by +delegate+ when a method is called on +nil+ and +allow_nil+ +# option is not used. +# +# source://activesupport//lib/active_support/core_ext/module/delegation.rb#8 +class Module::DelegationError < ::NoMethodError; end + +# source://activesupport//lib/active_support/core_ext/module/delegation.rb#10 +Module::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/core_ext/name_error.rb#3 +class NameError < ::StandardError + include ::ErrorHighlight::CoreExt + include ::DidYouMean::Correctable + + # Extract the name of the missing constant from the exception message. + # + # begin + # HelloWorld + # rescue NameError => e + # e.missing_name + # end + # # => "HelloWorld" + # + # source://activesupport//lib/active_support/core_ext/name_error.rb#12 + def missing_name; end + + # Was this exception raised because the given name was missing? + # + # begin + # HelloWorld + # rescue NameError => e + # e.missing_name?("HelloWorld") + # end + # # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/name_error.rb#44 + def missing_name?(name); end + + private + + # source://activesupport//lib/active_support/core_ext/name_error.rb#56 + def real_mod_name(mod); end +end + +# source://activesupport//lib/active_support/core_ext/name_error.rb#53 +NameError::UNBOUND_METHOD_MODULE_NAME = T.let(T.unsafe(nil), UnboundMethod) + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#50 +class NilClass + # source://activesupport//lib/active_support/core_ext/object/json.rb#87 + def as_json(options = T.unsafe(nil)); end + + # +nil+ is blank: + # + # nil.blank? # => true + # + # @return [true] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#56 + def blank?; end + + # Returns +self+. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#20 + def to_param; end + + # Calling +try+ on +nil+ always returns +nil+. + # It becomes especially helpful when navigating through associations that may return +nil+. + # + # nil.try(:name) # => nil + # + # Without +try+ + # @person && @person.children.any? && @person.children.first.name + # + # With +try+ + # @person.try(:children).try(:first).try(:name) + # + # source://activesupport//lib/active_support/core_ext/object/try.rb#148 + def try(*_arg0); end + + # Calling +try!+ on +nil+ always returns +nil+. + # + # nil.try!(:name) # => nil + # + # source://activesupport//lib/active_support/core_ext/object/try.rb#155 + def try!(*_arg0); end +end + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#134 +class Numeric + include ::Comparable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#105 + def as_json(options = T.unsafe(nil)); end + + # No number is blank: + # + # 1.blank? # => false + # 0.blank? # => false + # + # @return [false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#141 + def blank?; end + + # Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes + # + # 2.bytes # => 2 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#14 + def byte; end + + # Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes + # + # 2.bytes # => 2 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#14 + def bytes; end + + # Returns a Duration instance matching the number of days provided. + # + # 2.days # => 2 days + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#37 + def day; end + + # Returns a Duration instance matching the number of days provided. + # + # 2.days # => 2 days + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#37 + def days; end + + # Returns the number of bytes equivalent to the exabytes provided. + # + # 2.exabytes # => 2_305_843_009_213_693_952 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#62 + def exabyte; end + + # Returns the number of bytes equivalent to the exabytes provided. + # + # 2.exabytes # => 2_305_843_009_213_693_952 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#62 + def exabytes; end + + # Returns a Duration instance matching the number of fortnights provided. + # + # 2.fortnights # => 4 weeks + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#53 + def fortnight; end + + # Returns a Duration instance matching the number of fortnights provided. + # + # 2.fortnights # => 4 weeks + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#53 + def fortnights; end + + # Returns the number of bytes equivalent to the gigabytes provided. + # + # 2.gigabytes # => 2_147_483_648 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#38 + def gigabyte; end + + # Returns the number of bytes equivalent to the gigabytes provided. + # + # 2.gigabytes # => 2_147_483_648 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#38 + def gigabytes; end + + # Returns a Duration instance matching the number of hours provided. + # + # 2.hours # => 2 hours + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#29 + def hour; end + + # Returns a Duration instance matching the number of hours provided. + # + # 2.hours # => 2 hours + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#29 + def hours; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#156 + def html_safe?; end + + # Returns the number of milliseconds equivalent to the seconds provided. + # Used with the standard time durations. + # + # 2.in_milliseconds # => 2000 + # 1.hour.in_milliseconds # => 3600000 + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#63 + def in_milliseconds; end + + # Returns the number of bytes equivalent to the kilobytes provided. + # + # 2.kilobytes # => 2048 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#22 + def kilobyte; end + + # Returns the number of bytes equivalent to the kilobytes provided. + # + # 2.kilobytes # => 2048 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#22 + def kilobytes; end + + # Returns the number of bytes equivalent to the megabytes provided. + # + # 2.megabytes # => 2_097_152 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#30 + def megabyte; end + + # Returns the number of bytes equivalent to the megabytes provided. + # + # 2.megabytes # => 2_097_152 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#30 + def megabytes; end + + # Returns a Duration instance matching the number of minutes provided. + # + # 2.minutes # => 2 minutes + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#21 + def minute; end + + # Returns a Duration instance matching the number of minutes provided. + # + # 2.minutes # => 2 minutes + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#21 + def minutes; end + + # Returns the number of bytes equivalent to the petabytes provided. + # + # 2.petabytes # => 2_251_799_813_685_248 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#54 + def petabyte; end + + # Returns the number of bytes equivalent to the petabytes provided. + # + # 2.petabytes # => 2_251_799_813_685_248 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#54 + def petabytes; end + + # Returns a Duration instance matching the number of seconds provided. + # + # 2.seconds # => 2 seconds + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#13 + def second; end + + # Returns a Duration instance matching the number of seconds provided. + # + # 2.seconds # => 2 seconds + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#13 + def seconds; end + + # Returns the number of bytes equivalent to the terabytes provided. + # + # 2.terabytes # => 2_199_023_255_552 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#46 + def terabyte; end + + # Returns the number of bytes equivalent to the terabytes provided. + # + # 2.terabytes # => 2_199_023_255_552 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#46 + def terabytes; end + + # Returns a Duration instance matching the number of weeks provided. + # + # 2.weeks # => 2 weeks + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#45 + def week; end + + # Returns a Duration instance matching the number of weeks provided. + # + # 2.weeks # => 2 weeks + # + # source://activesupport//lib/active_support/core_ext/numeric/time.rb#45 + def weeks; end +end + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#9 +Numeric::EXABYTE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#6 +Numeric::GIGABYTE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#4 +Numeric::KILOBYTE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#5 +Numeric::MEGABYTE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#8 +Numeric::PETABYTE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#7 +Numeric::TERABYTE = T.let(T.unsafe(nil), Integer) + +# -- +# Most objects are cloneable, but not all. For example you can't dup methods: +# +# method(:puts).dup # => TypeError: allocator undefined for Method +# +# Classes may signal their instances are not duplicable removing +dup+/+clone+ +# or raising exceptions from them. So, to dup an arbitrary object you normally +# use an optimistic approach and are ready to catch an exception, say: +# +# arbitrary_object.dup rescue object +# +# Rails dups objects in a few critical spots where they are not that arbitrary. +# That rescue is very expensive (like 40 times slower than a predicate), and it +# is often triggered. +# +# That's why we hardcode the following cases and check duplicable? instead of +# using that rescue idiom. +# ++ +# +# source://activesupport//lib/active_support/core_ext/object/blank.rb#5 +class Object < ::BasicObject + include ::ActiveSupport::ToJsonWithActiveSupportEncoder + include ::ActiveSupport::Dependencies::RequireDependency + include ::Kernel + include ::PP::ObjectMixin + include ::ActiveSupport::Tryable + + # Provides a way to check whether some class acts like some other class based on the existence of + # an appropriately-named marker method. + # + # A class that provides the same interface as SomeClass may define a marker method named + # acts_like_some_class? to signal its compatibility to callers of + # acts_like?(:some_class). + # + # For example, Active Support extends Date to define an acts_like_date? method, + # and extends Time to define acts_like_time?. As a result, developers can call + # x.acts_like?(:time) and x.acts_like?(:date) to test duck-type compatibility, + # and classes that are able to act like Time can also define an acts_like_time? + # method to interoperate. + # + # Note that the marker method is only expected to exist. It isn't called, so its body or return + # value are irrelevant. + # + # ==== Example: A class that provides the same interface as String + # + # This class may define: + # + # class Stringish + # def acts_like_string? + # end + # end + # + # Then client code can query for duck-type-safeness this way: + # + # Stringish.new.acts_like?(:string) # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/acts_like.rb#33 + def acts_like?(duck); end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#59 + def as_json(options = T.unsafe(nil)); end + + # An object is blank if it's false, empty, or a whitespace string. + # For example, +nil+, '', ' ', [], {}, and +false+ are all blank. + # + # This simplifies + # + # !address || address.empty? + # + # to + # + # address.blank? + # + # @return [true, false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#18 + def blank?; end + + # Returns a deep copy of object if it's duplicable. If it's + # not duplicable, returns +self+. + # + # object = Object.new + # dup = object.deep_dup + # dup.instance_variable_set(:@a, 1) + # + # object.instance_variable_defined?(:@a) # => false + # dup.instance_variable_defined?(:@a) # => true + # + # source://activesupport//lib/active_support/core_ext/object/deep_dup.rb#15 + def deep_dup; end + + # Can you safely dup this object? + # + # False for method objects; + # true otherwise. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#26 + def duplicable?; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#150 + def html_safe?; end + + # Returns true if this object is included in the argument. Argument must be + # any object which responds to +#include?+. Usage: + # + # characters = ["Konata", "Kagami", "Tsukasa"] + # "Konata".in?(characters) # => true + # + # This will throw an +ArgumentError+ if the argument doesn't respond + # to +#include?+. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/inclusion.rb#12 + def in?(another_object); end + + # Returns a hash with string keys that maps instance variable names without "@" to their + # corresponding values. + # + # class C + # def initialize(x, y) + # @x, @y = x, y + # end + # end + # + # C.new(0, 1).instance_values # => {"x" => 0, "y" => 1} + # + # source://activesupport//lib/active_support/core_ext/object/instance_variables.rb#14 + def instance_values; end + + # Returns an array of instance variable names as strings including "@". + # + # class C + # def initialize(x, y) + # @x, @y = x, y + # end + # end + # + # C.new(0, 1).instance_variable_names # => ["@y", "@x"] + # + # source://activesupport//lib/active_support/core_ext/object/instance_variables.rb#27 + def instance_variable_names; end + + # Returns the receiver if it's present otherwise returns +nil+. + # object.presence is equivalent to + # + # object.present? ? object : nil + # + # For example, something like + # + # state = params[:state] if params[:state].present? + # country = params[:country] if params[:country].present? + # region = state || country || 'US' + # + # becomes + # + # region = params[:state].presence || params[:country].presence || 'US' + # + # @return [Object] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#45 + def presence; end + + # Returns the receiver if it's included in the argument otherwise returns +nil+. + # Argument must be any object which responds to +#include?+. Usage: + # + # params[:bucket_type].presence_in %w( project calendar ) + # + # This will throw an +ArgumentError+ if the argument doesn't respond to +#include?+. + # + # @return [Object] + # + # source://activesupport//lib/active_support/core_ext/object/inclusion.rb#26 + def presence_in(another_object); end + + # An object is present if it's not blank. + # + # @return [true, false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#25 + def present?; end + + # Alias of to_s. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#7 + def to_param; end + + # Converts an object into a string suitable for use as a URL query string, + # using the given key as the param name. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#13 + def to_query(key); end + + # An elegant way to factor duplication out of options passed to a series of + # method calls. Each method called in the block, with the block variable as + # the receiver, will have its options merged with the default +options+ hash + # provided. Each method called on the block variable must take an options + # hash as its final argument. + # + # Without with_options, this code contains duplication: + # + # class Account < ActiveRecord::Base + # has_many :customers, dependent: :destroy + # has_many :products, dependent: :destroy + # has_many :invoices, dependent: :destroy + # has_many :expenses, dependent: :destroy + # end + # + # Using with_options, we can remove the duplication: + # + # class Account < ActiveRecord::Base + # with_options dependent: :destroy do |assoc| + # assoc.has_many :customers + # assoc.has_many :products + # assoc.has_many :invoices + # assoc.has_many :expenses + # end + # end + # + # It can also be used with an explicit receiver: + # + # I18n.with_options locale: user.locale, scope: 'newsletter' do |i18n| + # subject i18n.t :subject + # body i18n.t :body, user_name: user.name + # end + # + # When you don't pass an explicit receiver, it executes the whole block + # in merging options context: + # + # class Account < ActiveRecord::Base + # with_options dependent: :destroy do + # has_many :customers + # has_many :products + # has_many :invoices + # has_many :expenses + # end + # end + # + # with_options can also be nested since the call is forwarded to its receiver. + # + # NOTE: Each nesting level will merge inherited defaults in addition to their own. + # + # class Post < ActiveRecord::Base + # with_options if: :persisted?, length: { minimum: 50 } do + # validates :content, if: -> { content.present? } + # end + # end + # + # The code is equivalent to: + # + # validates :content, length: { minimum: 50 }, if: -> { content.present? } + # + # Hence the inherited default for +if+ key is ignored. + # + # NOTE: You cannot call class methods implicitly inside of with_options. + # You can access these methods using the class name instead: + # + # class Phone < ActiveRecord::Base + # enum phone_number_type: { home: 0, office: 1, mobile: 2 } + # + # with_options presence: true do + # validates :phone_number_type, inclusion: { in: Phone.phone_number_types.keys } + # end + # end + # + # When the block argument is omitted, the decorated Object instance is returned: + # + # module MyStyledHelpers + # def styled + # with_options style: "color: red;" + # end + # end + # + # # styled.link_to "I'm red", "/" + # # #=> I'm red + # + # # styled.button_tag "I'm red too!" + # # #=> + # + # source://activesupport//lib/active_support/core_ext/object/with_options.rb#92 + def with_options(options, &block); end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#222 +class Pathname + # source://activesupport//lib/active_support/core_ext/object/json.rb#223 + def as_json(options = T.unsafe(nil)); end +end + +module Process + extend ::ActiveSupport::ForkTracker::ModernCoreExt + + class << self + # source://activesupport//lib/active_support/fork_tracker.rb#6 + def _fork; end + end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#234 +class Process::Status + # source://activesupport//lib/active_support/core_ext/object/json.rb#235 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#151 +class Range + include ::Enumerable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#152 + def as_json(options = T.unsafe(nil)); end + + # Optimize range sum to use arithmetic progression if a block is not given and + # we have a range of numeric values. + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#287 + def sum(identity = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#133 +class Regexp + # source://activesupport//lib/active_support/core_ext/object/json.rb#134 + def as_json(options = T.unsafe(nil)); end + + # Returns +true+ if the regexp has the multiline flag set. + # + # (/./).multiline? # => false + # (/./m).multiline? # => true + # + # Regexp.new(".").multiline? # => false + # Regexp.new(".", Regexp::MULTILINE).multiline? # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/regexp.rb#11 + def multiline?; end +end + +# source://activesupport//lib/active_support/core_ext/object/duplicable.rb#53 +module Singleton + mixes_in_class_methods ::Singleton::SingletonClassMethods + + # Singleton instances are not duplicable: + # + # Class.new.include(Singleton).instance.dup # TypeError (can't dup instance of singleton + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#57 + def duplicable?; end +end + +# String inflections define new methods on the String class to transform names for different purposes. +# For instance, you can figure out the name of a table from the name of a class. +# +# 'ScaleScore'.tableize # => "scale_scores" +# +# source://activesupport//lib/active_support/core_ext/object/blank.rb#103 +class String + include ::Comparable + + # Enables more predictable duck-typing on String-like classes. See Object#acts_like?. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/string/behavior.rb#5 + def acts_like_string?; end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#93 + def as_json(options = T.unsafe(nil)); end + + # If you pass a single integer, returns a substring of one character at that + # position. The first character of the string is at position 0, the next at + # position 1, and so on. If a range is supplied, a substring containing + # characters at offsets given by the range is returned. In both cases, if an + # offset is negative, it is counted from the end of the string. Returns +nil+ + # if the initial offset falls outside the string. Returns an empty string if + # the beginning of the range is greater than the end of the string. + # + # str = "hello" + # str.at(0) # => "h" + # str.at(1..3) # => "ell" + # str.at(-2) # => "l" + # str.at(-2..-1) # => "lo" + # str.at(5) # => nil + # str.at(5..-1) # => "" + # + # If a Regexp is given, the matching portion of the string is returned. + # If a String is given, that given string is returned if it occurs in + # the string. In both cases, +nil+ is returned if there is no match. + # + # str = "hello" + # str.at(/lo/) # => "lo" + # str.at(/ol/) # => nil + # str.at("lo") # => "lo" + # str.at("ol") # => nil + # + # source://activesupport//lib/active_support/core_ext/string/access.rb#29 + def at(position); end + + # A string is blank if it's empty or contains whitespaces only: + # + # ''.blank? # => true + # ' '.blank? # => true + # "\t\n\r".blank? # => true + # ' blah '.blank? # => false + # + # Unicode whitespace is supported: + # + # "\u00a0".blank? # => true + # + # @return [true, false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#121 + def blank?; end + + # By default, +camelize+ converts strings to UpperCamelCase. If the argument to camelize + # is set to :lower then camelize produces lowerCamelCase. + # + # +camelize+ will also convert '/' to '::' which is useful for converting paths to namespaces. + # + # 'active_record'.camelize # => "ActiveRecord" + # 'active_record'.camelize(:lower) # => "activeRecord" + # 'active_record/errors'.camelize # => "ActiveRecord::Errors" + # 'active_record/errors'.camelize(:lower) # => "activeRecord::Errors" + # + # +camelize+ is also aliased as +camelcase+. + # + # See ActiveSupport::Inflector.camelize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#103 + def camelcase(first_letter = T.unsafe(nil)); end + + # By default, +camelize+ converts strings to UpperCamelCase. If the argument to camelize + # is set to :lower then camelize produces lowerCamelCase. + # + # +camelize+ will also convert '/' to '::' which is useful for converting paths to namespaces. + # + # 'active_record'.camelize # => "ActiveRecord" + # 'active_record'.camelize(:lower) # => "activeRecord" + # 'active_record/errors'.camelize # => "ActiveRecord::Errors" + # 'active_record/errors'.camelize(:lower) # => "activeRecord::Errors" + # + # +camelize+ is also aliased as +camelcase+. + # + # See ActiveSupport::Inflector.camelize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#103 + def camelize(first_letter = T.unsafe(nil)); end + + # Creates a class name from a plural table name like Rails does for table names to models. + # Note that this returns a string and not a class. (To convert to an actual class + # follow +classify+ with +constantize+.) + # + # 'ham_and_eggs'.classify # => "HamAndEgg" + # 'posts'.classify # => "Post" + # + # See ActiveSupport::Inflector.classify. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#243 + def classify; end + + # +constantize+ tries to find a declared constant with the name specified + # in the string. It raises a NameError when the name is not in CamelCase + # or is not initialized. + # + # 'Module'.constantize # => Module + # 'Class'.constantize # => Class + # 'blargle'.constantize # => NameError: wrong constant name blargle + # + # See ActiveSupport::Inflector.constantize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#73 + def constantize; end + + # Replaces underscores with dashes in the string. + # + # 'puni_puni'.dasherize # => "puni-puni" + # + # See ActiveSupport::Inflector.dasherize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#152 + def dasherize; end + + # Removes the rightmost segment from the constant expression in the string. + # + # 'Net::HTTP'.deconstantize # => "Net" + # '::Net::HTTP'.deconstantize # => "::Net" + # 'String'.deconstantize # => "" + # '::String'.deconstantize # => "" + # ''.deconstantize # => "" + # + # See ActiveSupport::Inflector.deconstantize. + # + # See also +demodulize+. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#181 + def deconstantize; end + + # Removes the module part from the constant expression in the string. + # + # 'ActiveSupport::Inflector::Inflections'.demodulize # => "Inflections" + # 'Inflections'.demodulize # => "Inflections" + # '::Inflections'.demodulize # => "Inflections" + # ''.demodulize # => '' + # + # See ActiveSupport::Inflector.demodulize. + # + # See also +deconstantize+. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#166 + def demodulize; end + + # Returns the first character. If a limit is supplied, returns a substring + # from the beginning of the string until it reaches the limit value. If the + # given limit is greater than or equal to the string length, returns a copy of self. + # + # str = "hello" + # str.first # => "h" + # str.first(1) # => "h" + # str.first(2) # => "he" + # str.first(0) # => "" + # str.first(6) # => "hello" + # + # source://activesupport//lib/active_support/core_ext/string/access.rb#78 + def first(limit = T.unsafe(nil)); end + + # Creates a foreign key name from a class name. + # +separate_class_name_and_id_with_underscore+ sets whether + # the method should put '_' between the name and 'id'. + # + # 'Message'.foreign_key # => "message_id" + # 'Message'.foreign_key(false) # => "messageid" + # 'Admin::Post'.foreign_key # => "post_id" + # + # See ActiveSupport::Inflector.foreign_key. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#290 + def foreign_key(separate_class_name_and_id_with_underscore = T.unsafe(nil)); end + + # Returns a substring from the given position to the end of the string. + # If the position is negative, it is counted from the end of the string. + # + # str = "hello" + # str.from(0) # => "hello" + # str.from(3) # => "lo" + # str.from(-2) # => "lo" + # + # You can mix it with +to+ method and do fun things like: + # + # str = "hello" + # str.from(0).to(-1) # => "hello" + # str.from(1).to(-2) # => "ell" + # + # source://activesupport//lib/active_support/core_ext/string/access.rb#46 + def from(position); end + + # Marks a string as trusted safe. It will be inserted into HTML with no + # additional escaping performed. It is your responsibility to ensure that the + # string contains no malicious content. This method is equivalent to the + # +raw+ helper in views. It is recommended that you use +sanitize+ instead of + # this method. It should never be called on user input. + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#368 + def html_safe; end + + # Capitalizes the first word, turns underscores into spaces, and (by default)strips a + # trailing '_id' if present. + # Like +titleize+, this is meant for creating pretty output. + # + # The capitalization of the first word can be turned off by setting the + # optional parameter +capitalize+ to false. + # By default, this parameter is true. + # + # The trailing '_id' can be kept and capitalized by setting the + # optional parameter +keep_id_suffix+ to true. + # By default, this parameter is false. + # + # 'employee_salary'.humanize # => "Employee salary" + # 'author_id'.humanize # => "Author" + # 'author_id'.humanize(capitalize: false) # => "author" + # '_id'.humanize # => "Id" + # 'author_id'.humanize(keep_id_suffix: true) # => "Author id" + # + # See ActiveSupport::Inflector.humanize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#266 + def humanize(capitalize: T.unsafe(nil), keep_id_suffix: T.unsafe(nil)); end + + # Returns +true+ if string has utf_8 encoding. + # + # utf_8_str = "some string".encode "UTF-8" + # iso_str = "some string".encode "ISO-8859-1" + # + # utf_8_str.is_utf8? # => true + # iso_str.is_utf8? # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/string/multibyte.rb#48 + def is_utf8?; end + + # Returns the last character of the string. If a limit is supplied, returns a substring + # from the end of the string until it reaches the limit value (counting backwards). If + # the given limit is greater than or equal to the string length, returns a copy of self. + # + # str = "hello" + # str.last # => "o" + # str.last(1) # => "o" + # str.last(2) # => "lo" + # str.last(0) # => "" + # str.last(6) # => "hello" + # + # source://activesupport//lib/active_support/core_ext/string/access.rb#92 + def last(limit = T.unsafe(nil)); end + + # == Multibyte proxy + # + # +mb_chars+ is a multibyte safe proxy for string methods. + # + # It creates and returns an instance of the ActiveSupport::Multibyte::Chars class which + # encapsulates the original string. A Unicode safe version of all the String methods are defined on this proxy + # class. If the proxy class doesn't respond to a certain method, it's forwarded to the encapsulated string. + # + # >> "lj".mb_chars.upcase.to_s + # => "LJ" + # + # NOTE: Ruby 2.4 and later support native Unicode case mappings: + # + # >> "lj".upcase + # => "LJ" + # + # == Method chaining + # + # All the methods on the Chars proxy which normally return a string will return a Chars object. This allows + # method chaining on the result of any of these methods. + # + # name.mb_chars.reverse.length # => 12 + # + # == Interoperability and configuration + # + # The Chars object tries to be as interchangeable with String objects as possible: sorting and comparing between + # String and Char work like expected. The bang! methods change the internal string representation in the Chars + # object. Interoperability problems can be resolved easily with a +to_s+ call. + # + # For more information about the methods defined on the Chars proxy see ActiveSupport::Multibyte::Chars. For + # information about how to change the default Multibyte behavior see ActiveSupport::Multibyte. + # + # source://activesupport//lib/active_support/core_ext/string/multibyte.rb#37 + def mb_chars; end + + # Replaces special characters in a string so that it may be used as part of a 'pretty' URL. + # + # If the optional parameter +locale+ is specified, + # the word will be parameterized as a word of that language. + # By default, this parameter is set to nil and it will use + # the configured I18n.locale. + # + # class Person + # def to_param + # "#{id}-#{name.parameterize}" + # end + # end + # + # @person = Person.find(1) + # # => # + # + # <%= link_to(@person.name, person_path) %> + # # => Donald E. Knuth + # + # To preserve the case of the characters in a string, use the +preserve_case+ argument. + # + # class Person + # def to_param + # "#{id}-#{name.parameterize(preserve_case: true)}" + # end + # end + # + # @person = Person.find(1) + # # => # + # + # <%= link_to(@person.name, person_path) %> + # # => Donald E. Knuth + # + # See ActiveSupport::Inflector.parameterize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#219 + def parameterize(separator: T.unsafe(nil), preserve_case: T.unsafe(nil), locale: T.unsafe(nil)); end + + # Returns the plural form of the word in the string. + # + # If the optional parameter +count+ is specified, + # the singular form will be returned if count == 1. + # For any other value of +count+ the plural will be returned. + # + # If the optional parameter +locale+ is specified, + # the word will be pluralized as a word of that language. + # By default, this parameter is set to :en. + # You must define your own inflection rules for languages other than English. + # + # 'post'.pluralize # => "posts" + # 'octopus'.pluralize # => "octopi" + # 'sheep'.pluralize # => "sheep" + # 'words'.pluralize # => "words" + # 'the blue mailman'.pluralize # => "the blue mailmen" + # 'CamelOctopus'.pluralize # => "CamelOctopi" + # 'apple'.pluralize(1) # => "apple" + # 'apple'.pluralize(2) # => "apples" + # 'ley'.pluralize(:es) # => "leyes" + # 'ley'.pluralize(1, :es) # => "ley" + # + # See ActiveSupport::Inflector.pluralize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#35 + def pluralize(count = T.unsafe(nil), locale = T.unsafe(nil)); end + + # Returns a new string with all occurrences of the patterns removed. + # str = "foo bar test" + # str.remove(" test") # => "foo bar" + # str.remove(" test", /bar/) # => "foo " + # str # => "foo bar test" + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#32 + def remove(*patterns); end + + # Alters the string by removing all occurrences of the patterns. + # str = "foo bar test" + # str.remove!(" test", /bar/) # => "foo " + # str # => "foo " + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#40 + def remove!(*patterns); end + + # +safe_constantize+ tries to find a declared constant with the name specified + # in the string. It returns +nil+ when the name is not in CamelCase + # or is not initialized. + # + # 'Module'.safe_constantize # => Module + # 'Class'.safe_constantize # => Class + # 'blargle'.safe_constantize # => nil + # + # See ActiveSupport::Inflector.safe_constantize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#86 + def safe_constantize; end + + # The reverse of +pluralize+, returns the singular form of a word in a string. + # + # If the optional parameter +locale+ is specified, + # the word will be singularized as a word of that language. + # By default, this parameter is set to :en. + # You must define your own inflection rules for languages other than English. + # + # 'posts'.singularize # => "post" + # 'octopi'.singularize # => "octopus" + # 'sheep'.singularize # => "sheep" + # 'word'.singularize # => "word" + # 'the blue mailmen'.singularize # => "the blue mailman" + # 'CamelOctopi'.singularize # => "CamelOctopus" + # 'leyes'.singularize(:es) # => "ley" + # + # See ActiveSupport::Inflector.singularize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#60 + def singularize(locale = T.unsafe(nil)); end + + # Returns the string, first removing all whitespace on both ends of + # the string, and then changing remaining consecutive whitespace + # groups into one space each. + # + # Note that it handles both ASCII and Unicode whitespace. + # + # %{ Multi-line + # string }.squish # => "Multi-line string" + # " foo bar \n \t boo".squish # => "foo bar boo" + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#13 + def squish; end + + # Performs a destructive squish. See String#squish. + # str = " foo bar \n \t boo" + # str.squish! # => "foo bar boo" + # str # => "foo bar boo" + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#21 + def squish!; end + + # Creates the name of a table like Rails does for models to table names. This method + # uses the +pluralize+ method on the last word in the string. + # + # 'RawScaledScorer'.tableize # => "raw_scaled_scorers" + # 'ham_and_egg'.tableize # => "ham_and_eggs" + # 'fancyCategory'.tableize # => "fancy_categories" + # + # See ActiveSupport::Inflector.tableize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#231 + def tableize; end + + # Capitalizes all the words and replaces some characters in the string to create + # a nicer looking title. +titleize+ is meant for creating pretty output. It is not + # used in the Rails internals. + # + # The trailing '_id','Id'.. can be kept and capitalized by setting the + # optional parameter +keep_id_suffix+ to true. + # By default, this parameter is false. + # + # 'man from the boondocks'.titleize # => "Man From The Boondocks" + # 'x-men: the last stand'.titleize # => "X Men: The Last Stand" + # 'string_ending_with_id'.titleize(keep_id_suffix: true) # => "String Ending With Id" + # + # +titleize+ is also aliased as +titlecase+. + # + # See ActiveSupport::Inflector.titleize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#130 + def titlecase(keep_id_suffix: T.unsafe(nil)); end + + # Capitalizes all the words and replaces some characters in the string to create + # a nicer looking title. +titleize+ is meant for creating pretty output. It is not + # used in the Rails internals. + # + # The trailing '_id','Id'.. can be kept and capitalized by setting the + # optional parameter +keep_id_suffix+ to true. + # By default, this parameter is false. + # + # 'man from the boondocks'.titleize # => "Man From The Boondocks" + # 'x-men: the last stand'.titleize # => "X Men: The Last Stand" + # 'string_ending_with_id'.titleize(keep_id_suffix: true) # => "String Ending With Id" + # + # +titleize+ is also aliased as +titlecase+. + # + # See ActiveSupport::Inflector.titleize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#130 + def titleize(keep_id_suffix: T.unsafe(nil)); end + + # Returns a substring from the beginning of the string to the given position. + # If the position is negative, it is counted from the end of the string. + # + # str = "hello" + # str.to(0) # => "h" + # str.to(3) # => "hell" + # str.to(-2) # => "hell" + # + # You can mix it with +from+ method and do fun things like: + # + # str = "hello" + # str.from(0).to(-1) # => "hello" + # str.from(1).to(-2) # => "ell" + # + # source://activesupport//lib/active_support/core_ext/string/access.rb#63 + def to(position); end + + # Converts a string to a Date value. + # + # "1-1-2012".to_date # => Sun, 01 Jan 2012 + # "01/01/2012".to_date # => Sun, 01 Jan 2012 + # "2012-12-13".to_date # => Thu, 13 Dec 2012 + # "12/13/2012".to_date # => ArgumentError: invalid date + # + # source://activesupport//lib/active_support/core_ext/string/conversions.rb#47 + def to_date; end + + # Converts a string to a DateTime value. + # + # "1-1-2012".to_datetime # => Sun, 01 Jan 2012 00:00:00 +0000 + # "01/01/2012 23:59:59".to_datetime # => Sun, 01 Jan 2012 23:59:59 +0000 + # "2012-12-13 12:50".to_datetime # => Thu, 13 Dec 2012 12:50:00 +0000 + # "12/13/2012".to_datetime # => ArgumentError: invalid date + # + # source://activesupport//lib/active_support/core_ext/string/conversions.rb#57 + def to_datetime; end + + # Converts a string to a Time value. + # The +form+ can be either +:utc+ or +:local+ (default +:local+). + # + # The time is parsed using Time.parse method. + # If +form+ is +:local+, then the time is in the system timezone. + # If the date part is missing then the current date is used and if + # the time part is missing then it is assumed to be 00:00:00. + # + # "13-12-2012".to_time # => 2012-12-13 00:00:00 +0100 + # "06:12".to_time # => 2012-12-13 06:12:00 +0100 + # "2012-12-13 06:12".to_time # => 2012-12-13 06:12:00 +0100 + # "2012-12-13T06:12".to_time # => 2012-12-13 06:12:00 +0100 + # "2012-12-13T06:12".to_time(:utc) # => 2012-12-13 06:12:00 UTC + # "12/13/2012".to_time # => ArgumentError: argument out of range + # "1604326192".to_time # => ArgumentError: argument out of range + # + # source://activesupport//lib/active_support/core_ext/string/conversions.rb#22 + def to_time(form = T.unsafe(nil)); end + + # Truncates a given +text+ after a given length if +text+ is longer than length: + # + # 'Once upon a time in a world far far away'.truncate(27) + # # => "Once upon a time in a wo..." + # + # Pass a string or regexp :separator to truncate +text+ at a natural break: + # + # 'Once upon a time in a world far far away'.truncate(27, separator: ' ') + # # => "Once upon a time in a..." + # + # 'Once upon a time in a world far far away'.truncate(27, separator: /\s/) + # # => "Once upon a time in a..." + # + # The last characters will be replaced with the :omission string (defaults to "...") + # for a total length not exceeding length: + # + # 'And they found that many people were sleeping better.'.truncate(25, omission: '... (continued)') + # # => "And they f... (continued)" + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#66 + def truncate(truncate_at, options = T.unsafe(nil)); end + + # Truncates +text+ to at most bytesize bytes in length without + # breaking string encoding by splitting multibyte characters or breaking + # grapheme clusters ("perceptual characters") by truncating at combining + # characters. + # + # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".size + # => 20 + # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".bytesize + # => 80 + # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".truncate_bytes(20) + # => "🔪🔪🔪🔪…" + # + # The truncated text ends with the :omission string, defaulting + # to "…", for a total length not exceeding bytesize. + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#95 + def truncate_bytes(truncate_at, omission: T.unsafe(nil)); end + + # Truncates a given +text+ after a given number of words (words_count): + # + # 'Once upon a time in a world far far away'.truncate_words(4) + # # => "Once upon a time..." + # + # Pass a string or regexp :separator to specify a different separator of words: + # + # 'Once
    upon
    a
    time
    in
    a
    world'.truncate_words(5, separator: '
    ') + # # => "Once
    upon
    a
    time
    in..." + # + # The last characters will be replaced with the :omission string (defaults to "..."): + # + # 'And they found that many people were sleeping better.'.truncate_words(5, omission: '... (continued)') + # # => "And they found that many... (continued)" + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#136 + def truncate_words(words_count, options = T.unsafe(nil)); end + + # The reverse of +camelize+. Makes an underscored, lowercase form from the expression in the string. + # + # +underscore+ will also change '::' to '/' to convert namespaces to paths. + # + # 'ActiveModel'.underscore # => "active_model" + # 'ActiveModel::Errors'.underscore # => "active_model/errors" + # + # See ActiveSupport::Inflector.underscore. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#143 + def underscore; end + + # Converts just the first character to uppercase. + # + # 'what a Lovely Day'.upcase_first # => "What a Lovely Day" + # 'w'.upcase_first # => "W" + # ''.upcase_first # => "" + # + # See ActiveSupport::Inflector.upcase_first. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#277 + def upcase_first; end +end + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#104 +String::BLANK_RE = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#105 +String::ENCODED_BLANKS = T.let(T.unsafe(nil), Concurrent::Map) + +# source://activesupport//lib/active_support/core_ext/object/json.rb#68 +class Struct + include ::Enumerable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#69 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#98 +class Symbol + include ::Comparable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#99 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#146 +class Time + include ::Comparable + include ::DateAndTime::Zones + include ::DateAndTime::Calculations + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#280 + def +(other); end + + # Time#- can also be used to determine the number of seconds between two Time instances. + # We're layering on additional behavior so that ActiveSupport::TimeWithZone instances + # are coerced into values that Time#- will recognize + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#303 + def -(other); end + + # Layers additional behavior on Time#<=> so that DateTime and ActiveSupport::TimeWithZone instances + # can be chronologically compared with a Time + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#312 + def <=>(other); end + + # Duck-types as a Time-like class. See Object#acts_like?. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/time/acts_like.rb#7 + def acts_like_time?; end + + # Uses Date to provide precise Time calculations for years, months, and days + # according to the proleptic Gregorian calendar. The +options+ parameter + # takes a hash with any of these keys: :years, :months, + # :weeks, :days, :hours, :minutes, + # :seconds. + # + # Time.new(2015, 8, 1, 14, 35, 0).advance(seconds: 1) # => 2015-08-01 14:35:01 -0700 + # Time.new(2015, 8, 1, 14, 35, 0).advance(minutes: 1) # => 2015-08-01 14:36:00 -0700 + # Time.new(2015, 8, 1, 14, 35, 0).advance(hours: 1) # => 2015-08-01 15:35:00 -0700 + # Time.new(2015, 8, 1, 14, 35, 0).advance(days: 1) # => 2015-08-02 14:35:00 -0700 + # Time.new(2015, 8, 1, 14, 35, 0).advance(weeks: 1) # => 2015-08-08 14:35:00 -0700 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#182 + def advance(options); end + + # Returns a new Time representing the time a number of seconds ago, this is basically a wrapper around the Numeric extension + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#208 + def ago(seconds); end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#187 + def as_json(options = T.unsafe(nil)); end + + # Returns a new Time representing the start of the day (0:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#221 + def at_beginning_of_day; end + + # Returns a new Time representing the start of the hour (x:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#250 + def at_beginning_of_hour; end + + # Returns a new Time representing the start of the minute (x:xx:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#266 + def at_beginning_of_minute; end + + # Returns a new Time representing the end of the day, 23:59:59.999999 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#239 + def at_end_of_day; end + + # Returns a new Time representing the end of the hour, x:59:59.999999 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#256 + def at_end_of_hour; end + + # Returns a new Time representing the end of the minute, x:xx:59.999999 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#272 + def at_end_of_minute; end + + # Returns a new Time representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#229 + def at_midday; end + + # Returns a new Time representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#229 + def at_middle_of_day; end + + # Returns a new Time representing the start of the day (0:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#221 + def at_midnight; end + + # Returns a new Time representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#229 + def at_noon; end + + # Returns a new Time representing the start of the day (0:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#221 + def beginning_of_day; end + + # Returns a new Time representing the start of the hour (x:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#250 + def beginning_of_hour; end + + # Returns a new Time representing the start of the minute (x:xx:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#266 + def beginning_of_minute; end + + # No Time is blank: + # + # Time.now.blank? # => false + # + # @return [false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#152 + def blank?; end + + # Returns a new Time where one or more of the elements have been changed according + # to the +options+ parameter. The time options (:hour, :min, + # :sec, :usec, :nsec) reset cascadingly, so if only + # the hour is passed, then minute, sec, usec, and nsec is set to 0. If the hour + # and minute is passed, then sec, usec, and nsec is set to 0. The +options+ parameter + # takes a hash with any of these keys: :year, :month, :day, + # :hour, :min, :sec, :usec, :nsec, + # :offset. Pass either :usec or :nsec, not both. + # + # Time.new(2012, 8, 29, 22, 35, 0).change(day: 1) # => Time.new(2012, 8, 1, 22, 35, 0) + # Time.new(2012, 8, 29, 22, 35, 0).change(year: 1981, day: 1) # => Time.new(1981, 8, 1, 22, 35, 0) + # Time.new(2012, 8, 29, 22, 35, 0).change(year: 1981, hour: 0) # => Time.new(1981, 8, 29, 0, 0, 0) + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#138 + def change(options); end + + # Layers additional behavior on Time#<=> so that DateTime and ActiveSupport::TimeWithZone instances + # can be chronologically compared with a Time + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#312 + def compare_with_coercion(other); end + + # Returns a new Time representing the end of the day, 23:59:59.999999 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#239 + def end_of_day; end + + # Returns a new Time representing the end of the hour, x:59:59.999999 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#256 + def end_of_hour; end + + # Returns a new Time representing the end of the minute, x:xx:59.999999 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#272 + def end_of_minute; end + + # Layers additional behavior on Time#eql? so that ActiveSupport::TimeWithZone instances + # can be eql? to an equivalent Time + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#327 + def eql?(other); end + + # Layers additional behavior on Time#eql? so that ActiveSupport::TimeWithZone instances + # can be eql? to an equivalent Time + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#327 + def eql_with_coercion(other); end + + # Returns a formatted string of the offset from UTC, or an alternative + # string if the time zone is already UTC. + # + # Time.local(2000).formatted_offset # => "-06:00" + # Time.local(2000).formatted_offset(false) # => "-0600" + # + # source://activesupport//lib/active_support/core_ext/time/conversions.rb#69 + def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end + + # Returns a new Time representing the time a number of seconds since the instance time + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#213 + def in(seconds); end + + # Returns a new Time representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#229 + def midday; end + + # Returns a new Time representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#229 + def middle_of_day; end + + # Returns a new Time representing the start of the day (0:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#221 + def midnight; end + + # Time#- can also be used to determine the number of seconds between two Time instances. + # We're layering on additional behavior so that ActiveSupport::TimeWithZone instances + # are coerced into values that Time#- will recognize + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#303 + def minus_with_coercion(other); end + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#290 + def minus_with_duration(other); end + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#290 + def minus_without_coercion(other); end + + # Returns a new time the specified number of days in the future. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#341 + def next_day(days = T.unsafe(nil)); end + + # Returns a new time the specified number of months in the future. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#351 + def next_month(months = T.unsafe(nil)); end + + # Returns a new time the specified number of years in the future. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#361 + def next_year(years = T.unsafe(nil)); end + + # Returns a new Time representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#229 + def noon; end + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#280 + def plus_with_duration(other); end + + # Returns a new time the specified number of days ago. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#336 + def prev_day(days = T.unsafe(nil)); end + + # Returns a new time the specified number of months ago. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#346 + def prev_month(months = T.unsafe(nil)); end + + # Returns a new time the specified number of years ago. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#356 + def prev_year(years = T.unsafe(nil)); end + + # Returns the fraction of a second as a +Rational+ + # + # Time.new(2012, 8, 29, 0, 0, 0.5).sec_fraction # => (1/2) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#107 + def sec_fraction; end + + # Returns the number of seconds since 00:00:00. + # + # Time.new(2012, 8, 29, 0, 0, 0).seconds_since_midnight # => 0.0 + # Time.new(2012, 8, 29, 12, 34, 56).seconds_since_midnight # => 45296.0 + # Time.new(2012, 8, 29, 23, 59, 59).seconds_since_midnight # => 86399.0 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#91 + def seconds_since_midnight; end + + # Returns the number of seconds until 23:59:59. + # + # Time.new(2012, 8, 29, 0, 0, 0).seconds_until_end_of_day # => 86399 + # Time.new(2012, 8, 29, 12, 34, 56).seconds_until_end_of_day # => 41103 + # Time.new(2012, 8, 29, 23, 59, 59).seconds_until_end_of_day # => 0 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#100 + def seconds_until_end_of_day; end + + # Returns a new Time representing the time a number of seconds since the instance time + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#213 + def since(seconds); end + + # Converts to a formatted string. See DATE_FORMATS for built-in formats. + # + # This method is aliased to to_formatted_s. + # + # time = Time.now # => 2007-01-18 06:10:17 -06:00 + # + # time.to_fs(:time) # => "06:10" + # time.to_formatted_s(:time) # => "06:10" + # + # time.to_fs(:db) # => "2007-01-18 06:10:17" + # time.to_fs(:number) # => "20070118061017" + # time.to_fs(:short) # => "18 Jan 06:10" + # time.to_fs(:long) # => "January 18, 2007 06:10" + # time.to_fs(:long_ordinal) # => "January 18th, 2007 06:10" + # time.to_fs(:rfc822) # => "Thu, 18 Jan 2007 06:10:17 -0600" + # time.to_fs(:iso8601) # => "2007-01-18T06:10:17-06:00" + # + # == Adding your own time formats to +to_fs+ + # You can add your own formats to the Time::DATE_FORMATS hash. + # Use the format name as the hash key and either a strftime string + # or Proc instance that takes a time argument as the value. + # + # # config/initializers/time_formats.rb + # Time::DATE_FORMATS[:month_and_year] = '%B %Y' + # Time::DATE_FORMATS[:short_ordinal] = ->(time) { time.strftime("%B #{time.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/time/conversions.rb#53 + def to_formatted_s(format = T.unsafe(nil)); end + + # Converts to a formatted string. See DATE_FORMATS for built-in formats. + # + # This method is aliased to to_formatted_s. + # + # time = Time.now # => 2007-01-18 06:10:17 -06:00 + # + # time.to_fs(:time) # => "06:10" + # time.to_formatted_s(:time) # => "06:10" + # + # time.to_fs(:db) # => "2007-01-18 06:10:17" + # time.to_fs(:number) # => "20070118061017" + # time.to_fs(:short) # => "18 Jan 06:10" + # time.to_fs(:long) # => "January 18, 2007 06:10" + # time.to_fs(:long_ordinal) # => "January 18th, 2007 06:10" + # time.to_fs(:rfc822) # => "Thu, 18 Jan 2007 06:10:17 -0600" + # time.to_fs(:iso8601) # => "2007-01-18T06:10:17-06:00" + # + # == Adding your own time formats to +to_fs+ + # You can add your own formats to the Time::DATE_FORMATS hash. + # Use the format name as the hash key and either a strftime string + # or Proc instance that takes a time argument as the value. + # + # # config/initializers/time_formats.rb + # Time::DATE_FORMATS[:month_and_year] = '%B %Y' + # Time::DATE_FORMATS[:short_ordinal] = ->(time) { time.strftime("%B #{time.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/time/conversions.rb#53 + def to_fs(format = T.unsafe(nil)); end + + class << self + # Overriding case equality method so that it returns true for ActiveSupport::TimeWithZone instances + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#18 + def ===(other); end + + # Layers additional behavior on Time.at so that ActiveSupport::TimeWithZone and DateTime + # instances can be used when called with a single argument + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#45 + def at(*args, **kwargs); end + + # Layers additional behavior on Time.at so that ActiveSupport::TimeWithZone and DateTime + # instances can be used when called with a single argument + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#45 + def at_with_coercion(*args, **kwargs); end + + # Returns Time.zone.now when Time.zone or config.time_zone are set, otherwise just returns Time.now. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#39 + def current; end + + # Returns the number of days in the given month. + # If no year is specified, it will use the current year. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#24 + def days_in_month(month, year = T.unsafe(nil)); end + + # Returns the number of days in the given year. + # If no year is specified, it will use the current year. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#34 + def days_in_year(year = T.unsafe(nil)); end + + # Returns a TimeZone instance matching the time zone provided. + # Accepts the time zone in any format supported by Time.zone=. + # Returns +nil+ for invalid time zones. + # + # Time.find_zone "America/New_York" # => # + # Time.find_zone "NOT-A-TIMEZONE" # => nil + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#94 + def find_zone(time_zone); end + + # Returns a TimeZone instance matching the time zone provided. + # Accepts the time zone in any format supported by Time.zone=. + # Raises an +ArgumentError+ for invalid time zones. + # + # Time.find_zone! "America/New_York" # => # + # Time.find_zone! "EST" # => # + # Time.find_zone! -5.hours # => # + # Time.find_zone! nil # => nil + # Time.find_zone! false # => false + # Time.find_zone! "NOT-A-TIMEZONE" # => ArgumentError: Invalid Timezone: NOT-A-TIMEZONE + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#82 + def find_zone!(time_zone); end + + # Creates a +Time+ instance from an RFC 3339 string. + # + # Time.rfc3339('1999-12-31T14:00:00-10:00') # => 2000-01-01 00:00:00 -1000 + # + # If the time or offset components are missing then an +ArgumentError+ will be raised. + # + # Time.rfc3339('1999-12-31') # => ArgumentError: invalid date + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#69 + def rfc3339(str); end + + # Allows override of Time.zone locally inside supplied block; + # resets Time.zone to existing value when done. + # + # class ApplicationController < ActionController::Base + # around_action :set_time_zone + # + # private + # + # def set_time_zone + # Time.use_zone(current_user.timezone) { yield } + # end + # end + # + # NOTE: This won't affect any ActiveSupport::TimeWithZone + # objects that have already been created, e.g. any model timestamp + # attributes that have been read before the block will remain in + # the application's default timezone. + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#62 + def use_zone(time_zone); end + + # Returns the TimeZone for the current request, if this has been set (via Time.zone=). + # If Time.zone has not been set for the current request, returns the TimeZone specified in config.time_zone. + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#14 + def zone; end + + # Sets Time.zone to a TimeZone object for the current request/thread. + # + # This method accepts any of the following: + # + # * A Rails TimeZone object. + # * An identifier for a Rails TimeZone object (e.g., "Eastern Time (US & Canada)", -5.hours). + # * A TZInfo::Timezone object. + # * An identifier for a TZInfo::Timezone object (e.g., "America/New_York"). + # + # Here's an example of how you might set Time.zone on a per request basis and reset it when the request is done. + # current_user.time_zone just needs to return a string identifying the user's preferred time zone: + # + # class ApplicationController < ActionController::Base + # around_action :set_time_zone + # + # def set_time_zone + # if logged_in? + # Time.use_zone(current_user.time_zone) { yield } + # else + # yield + # end + # end + # end + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#41 + def zone=(time_zone); end + + # Returns the value of attribute zone_default. + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#10 + def zone_default; end + + # Sets the attribute zone_default + # + # @param value the value to set the attribute zone_default to. + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#10 + def zone_default=(_arg0); end + end +end + +# source://activesupport//lib/active_support/core_ext/time/calculations.rb#14 +Time::COMMON_YEAR_DAYS_IN_MONTH = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/core_ext/time/conversions.rb#8 +Time::DATE_FORMATS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#72 +class TrueClass + # source://activesupport//lib/active_support/core_ext/object/json.rb#75 + def as_json(options = T.unsafe(nil)); end + + # +true+ is not blank: + # + # true.blank? # => false + # + # @return [false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#78 + def blank?; end + + # Returns +self+. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#27 + def to_param; end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#216 +class URI::Generic + include ::URI::RFC2396_REGEXP + include ::URI + + # source://activesupport//lib/active_support/core_ext/object/json.rb#217 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/duplicable.rb#41 +class UnboundMethod + # Unbound methods are not duplicable: + # + # method(:puts).unbind.duplicable? # => false + # method(:puts).unbind.dup # => TypeError: allocator undefined for UnboundMethod + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#46 + def duplicable?; end +end diff --git a/sorbet/rbi/gems/addressable@2.8.1.rbi b/sorbet/rbi/gems/addressable@2.8.1.rbi new file mode 100644 index 0000000..b77dd49 --- /dev/null +++ b/sorbet/rbi/gems/addressable@2.8.1.rbi @@ -0,0 +1,1398 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `addressable` gem. +# Please instead update this file by running `bin/tapioca gem addressable`. + +# Addressable is a library for processing links and URIs. +# +# source://addressable//lib/addressable/version.rb#22 +module Addressable; end + +# source://addressable//lib/addressable/idna/pure.rb#21 +module Addressable::IDNA + class << self + # Converts from a Unicode internationalized domain name to an ASCII + # domain name as described in RFC 3490. + # + # source://addressable//lib/addressable/idna/pure.rb#67 + def to_ascii(input); end + + # Converts from an ASCII domain name to a Unicode internationalized + # domain name as described in RFC 3490. + # + # source://addressable//lib/addressable/idna/pure.rb#93 + def to_unicode(input); end + + # Unicode normalization form KC. + # + # source://addressable//lib/addressable/idna/pure.rb#116 + def unicode_normalize_kc(input); end + + private + + # source://addressable//lib/addressable/idna/pure.rb#282 + def lookup_unicode_combining_class(codepoint); end + + # source://addressable//lib/addressable/idna/pure.rb#290 + def lookup_unicode_compatibility(codepoint); end + + # source://addressable//lib/addressable/idna/pure.rb#305 + def lookup_unicode_composition(unpacked); end + + # source://addressable//lib/addressable/idna/pure.rb#297 + def lookup_unicode_lowercase(codepoint); end + + # Bias adaptation method + # + # source://addressable//lib/addressable/idna/pure.rb#660 + def punycode_adapt(delta, numpoints, firsttime); end + + # @return [Boolean] + # + # source://addressable//lib/addressable/idna/pure.rb#628 + def punycode_basic?(codepoint); end + + # source://addressable//lib/addressable/idna/pure.rb#506 + def punycode_decode(punycode); end + + # Returns the numeric value of a basic codepoint + # (for use in representing integers) in the range 0 to + # base - 1, or PUNYCODE_BASE if codepoint does not represent a value. + # + # source://addressable//lib/addressable/idna/pure.rb#646 + def punycode_decode_digit(codepoint); end + + # @return [Boolean] + # + # source://addressable//lib/addressable/idna/pure.rb#633 + def punycode_delimiter?(codepoint); end + + # source://addressable//lib/addressable/idna/pure.rb#385 + def punycode_encode(unicode); end + + # source://addressable//lib/addressable/idna/pure.rb#638 + def punycode_encode_digit(d); end + + # source://addressable//lib/addressable/idna/pure.rb#188 + def ucs4_to_utf8(char, buffer); end + + # source://addressable//lib/addressable/idna/pure.rb#139 + def unicode_compose(unpacked); end + + # source://addressable//lib/addressable/idna/pure.rb#164 + def unicode_compose_pair(ch_one, ch_two); end + + # source://addressable//lib/addressable/idna/pure.rb#244 + def unicode_decompose(unpacked); end + + # source://addressable//lib/addressable/idna/pure.rb#265 + def unicode_decompose_hangul(codepoint); end + + # Unicode aware downcase method. + # + # @api private + # @param input [String] The input string. + # @return [String] The downcased result. + # + # source://addressable//lib/addressable/idna/pure.rb#131 + def unicode_downcase(input); end + + # source://addressable//lib/addressable/idna/pure.rb#220 + def unicode_sort_canonical(unpacked); end + end +end + +# source://addressable//lib/addressable/idna/pure.rb#355 +Addressable::IDNA::ACE_MAX_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#40 +Addressable::IDNA::ACE_PREFIX = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/idna/pure.rb#344 +Addressable::IDNA::COMPOSITION_TABLE = T.let(T.unsafe(nil), Hash) + +# source://addressable//lib/addressable/idna/pure.rb#311 +Addressable::IDNA::HANGUL_LBASE = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#312 +Addressable::IDNA::HANGUL_LCOUNT = T.let(T.unsafe(nil), Integer) + +# 588 +# +# source://addressable//lib/addressable/idna/pure.rb#317 +Addressable::IDNA::HANGUL_NCOUNT = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#310 +Addressable::IDNA::HANGUL_SBASE = T.let(T.unsafe(nil), Integer) + +# 11172 +# +# source://addressable//lib/addressable/idna/pure.rb#318 +Addressable::IDNA::HANGUL_SCOUNT = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#315 +Addressable::IDNA::HANGUL_TBASE = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#316 +Addressable::IDNA::HANGUL_TCOUNT = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#313 +Addressable::IDNA::HANGUL_VBASE = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#314 +Addressable::IDNA::HANGUL_VCOUNT = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#357 +Addressable::IDNA::PUNYCODE_BASE = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#361 +Addressable::IDNA::PUNYCODE_DAMP = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#364 +Addressable::IDNA::PUNYCODE_DELIMITER = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#362 +Addressable::IDNA::PUNYCODE_INITIAL_BIAS = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#363 +Addressable::IDNA::PUNYCODE_INITIAL_N = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#366 +Addressable::IDNA::PUNYCODE_MAXINT = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#368 +Addressable::IDNA::PUNYCODE_PRINT_ASCII = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/idna/pure.rb#360 +Addressable::IDNA::PUNYCODE_SKEW = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#359 +Addressable::IDNA::PUNYCODE_TMAX = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#358 +Addressable::IDNA::PUNYCODE_TMIN = T.let(T.unsafe(nil), Integer) + +# Input is invalid. +# +# source://addressable//lib/addressable/idna/pure.rb#379 +class Addressable::IDNA::PunycodeBadInput < ::StandardError; end + +# Output would exceed the space provided. +# +# source://addressable//lib/addressable/idna/pure.rb#381 +class Addressable::IDNA::PunycodeBigOutput < ::StandardError; end + +# Input needs wider integers to process. +# +# source://addressable//lib/addressable/idna/pure.rb#383 +class Addressable::IDNA::PunycodeOverflow < ::StandardError; end + +# source://addressable//lib/addressable/idna/pure.rb#335 +Addressable::IDNA::UNICODE_DATA = T.let(T.unsafe(nil), Hash) + +# source://addressable//lib/addressable/idna/pure.rb#322 +Addressable::IDNA::UNICODE_DATA_CANONICAL = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#320 +Addressable::IDNA::UNICODE_DATA_COMBINING_CLASS = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#323 +Addressable::IDNA::UNICODE_DATA_COMPATIBILITY = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#321 +Addressable::IDNA::UNICODE_DATA_EXCLUSION = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#325 +Addressable::IDNA::UNICODE_DATA_LOWERCASE = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#326 +Addressable::IDNA::UNICODE_DATA_TITLECASE = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#324 +Addressable::IDNA::UNICODE_DATA_UPPERCASE = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#354 +Addressable::IDNA::UNICODE_MAX_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#36 +Addressable::IDNA::UNICODE_TABLE = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/idna/pure.rb#42 +Addressable::IDNA::UTF8_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/idna/pure.rb#53 +Addressable::IDNA::UTF8_REGEX_MULTIBYTE = T.let(T.unsafe(nil), Regexp) + +# This is an implementation of a URI parser based on +# RFC 3986, +# RFC 3987. +# +# source://addressable//lib/addressable/uri.rb#31 +class Addressable::URI + # Creates a new uri object from component parts. + # + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @param [String, [Hash] a customizable set of options + # @return [Addressable::URI] The constructed URI object. + # + # source://addressable//lib/addressable/uri.rb#824 + def initialize(options = T.unsafe(nil)); end + + # Joins two URIs together. + # + # @param The [String, Addressable::URI, #to_str] URI to join with. + # @return [Addressable::URI] The joined URI. + # + # source://addressable//lib/addressable/uri.rb#1898 + def +(uri); end + + # Returns true if the URI objects are equal. This method + # normalizes both URIs before doing the comparison. + # + # @param uri [Object] The URI to compare. + # @return [TrueClass, FalseClass] true if the URIs are equivalent, false + # otherwise. + # + # source://addressable//lib/addressable/uri.rb#2248 + def ==(uri); end + + # Returns true if the URI objects are equal. This method + # normalizes both URIs before doing the comparison, and allows comparison + # against Strings. + # + # @param uri [Object] The URI to compare. + # @return [TrueClass, FalseClass] true if the URIs are equivalent, false + # otherwise. + # + # source://addressable//lib/addressable/uri.rb#2226 + def ===(uri); end + + # Determines if the URI is absolute. + # + # @return [TrueClass, FalseClass] true if the URI is absolute. false + # otherwise. + # + # source://addressable//lib/addressable/uri.rb#1888 + def absolute?; end + + # The authority component for this URI. + # Combines the user, password, host, and port components. + # + # @return [String] The authority component. + # + # source://addressable//lib/addressable/uri.rb#1235 + def authority; end + + # Sets the authority component for this URI. + # + # @param new_authority [String, #to_str] The new authority component. + # + # source://addressable//lib/addressable/uri.rb#1275 + def authority=(new_authority); end + + # The basename, if any, of the file in the path component. + # + # @return [String] The path's basename. + # + # source://addressable//lib/addressable/uri.rb#1593 + def basename; end + + # The default port for this URI's scheme. + # This method will always returns the default port for the URI's scheme + # regardless of the presence of an explicit port in the URI. + # + # @return [Integer] The default port. + # + # source://addressable//lib/addressable/uri.rb#1457 + def default_port; end + + # This method allows you to make several changes to a URI simultaneously, + # which separately would cause validation errors, but in conjunction, + # are valid. The URI will be revalidated as soon as the entire block has + # been executed. + # + # @param block [Proc] A set of operations to perform on a given URI. + # @raise [LocalJumpError] + # + # source://addressable//lib/addressable/uri.rb#2405 + def defer_validation; end + + # Creates a URI suitable for display to users. If semantic attacks are + # likely, the application should try to detect these and warn the user. + # See RFC 3986, + # section 7.6 for more information. + # + # @return [Addressable::URI] A URI suitable for display purposes. + # + # source://addressable//lib/addressable/uri.rb#2210 + def display_uri; end + + # Returns the public suffix domain for this host. + # + # @example + # Addressable::URI.parse("http://www.example.co.uk").domain # => "example.co.uk" + # + # source://addressable//lib/addressable/uri.rb#1226 + def domain; end + + # Clones the URI object. + # + # @return [Addressable::URI] The cloned URI. + # + # source://addressable//lib/addressable/uri.rb#2280 + def dup; end + + # Determines if the URI is an empty string. + # + # @return [TrueClass, FalseClass] Returns true if empty, false otherwise. + # + # source://addressable//lib/addressable/uri.rb#2342 + def empty?; end + + # Returns true if the URI objects are equal. This method + # does NOT normalize either URI before doing the comparison. + # + # @param uri [Object] The URI to compare. + # @return [TrueClass, FalseClass] true if the URIs are equivalent, false + # otherwise. + # + # source://addressable//lib/addressable/uri.rb#2262 + def eql?(uri); end + + # The extname, if any, of the file in the path component. + # Empty string if there is no extension. + # + # @return [String] The path's extname. + # + # source://addressable//lib/addressable/uri.rb#1603 + def extname; end + + # The fragment component for this URI. + # + # @return [String] The fragment component. + # + # source://addressable//lib/addressable/uri.rb#1817 + def fragment; end + + # Sets the fragment component for this URI. + # + # @param new_fragment [String, #to_str] The new fragment component. + # + # source://addressable//lib/addressable/uri.rb#1844 + def fragment=(new_fragment); end + + # Freeze URI, initializing instance variables. + # + # @return [Addressable::URI] The frozen URI object. + # + # source://addressable//lib/addressable/uri.rb#861 + def freeze; end + + # A hash value that will make a URI equivalent to its normalized + # form. + # + # @return [Integer] A hash of the URI. + # + # source://addressable//lib/addressable/uri.rb#2272 + def hash; end + + # The host component for this URI. + # + # @return [String] The host component. + # + # source://addressable//lib/addressable/uri.rb#1119 + def host; end + + # Sets the host component for this URI. + # + # @param new_host [String, #to_str] The new host component. + # + # source://addressable//lib/addressable/uri.rb#1157 + def host=(new_host); end + + # This method is same as URI::Generic#host except + # brackets for IPv6 (and 'IPvFuture') addresses are removed. + # + # @return [String] The hostname for this URI. + # @see Addressable::URI#host + # + # source://addressable//lib/addressable/uri.rb#1179 + def hostname; end + + # This method is same as URI::Generic#host= except + # the argument can be a bare IPv6 address (or 'IPvFuture'). + # + # @param new_hostname [String, #to_str] The new hostname for this URI. + # @see Addressable::URI#host= + # + # source://addressable//lib/addressable/uri.rb#1191 + def hostname=(new_hostname); end + + # The inferred port component for this URI. + # This method will normalize to the default port for the URI's scheme if + # the port isn't explicitly specified in the URI. + # + # @return [Integer] The inferred port component. + # + # source://addressable//lib/addressable/uri.rb#1443 + def inferred_port; end + + # Returns a String representation of the URI object's state. + # + # @return [String] The URI object's state, as a String. + # + # source://addressable//lib/addressable/uri.rb#2393 + def inspect; end + + # Determines if the scheme indicates an IP-based protocol. + # + # @return [TrueClass, FalseClass] true if the scheme indicates an IP-based protocol. + # false otherwise. + # + # source://addressable//lib/addressable/uri.rb#1864 + def ip_based?; end + + # Joins two URIs together. + # + # @param The [String, Addressable::URI, #to_str] URI to join with. + # @return [Addressable::URI] The joined URI. + # + # source://addressable//lib/addressable/uri.rb#1898 + def join(uri); end + + # Destructive form of join. + # + # @param The [String, Addressable::URI, #to_str] URI to join with. + # @return [Addressable::URI] The joined URI. + # @see Addressable::URI#join + # + # source://addressable//lib/addressable/uri.rb#2001 + def join!(uri); end + + # Merges a URI with a Hash of components. + # This method has different behavior from join. Any + # components present in the hash parameter will override the + # original components. The path component is not treated specially. + # + # @param The [Hash, Addressable::URI, #to_hash] components to merge with. + # @return [Addressable::URI] The merged URI. + # @see Hash#merge + # + # source://addressable//lib/addressable/uri.rb#2016 + def merge(hash); end + + # Destructive form of merge. + # + # @param The [Hash, Addressable::URI, #to_hash] components to merge with. + # @return [Addressable::URI] The merged URI. + # @see Addressable::URI#merge + # + # source://addressable//lib/addressable/uri.rb#2081 + def merge!(uri); end + + # Returns a normalized URI object. + # + # NOTE: This method does not attempt to fully conform to specifications. + # It exists largely to correct other people's failures to read the + # specifications, and also to deal with caching issues since several + # different URIs may represent the same resource and should not be + # cached multiple times. + # + # @return [Addressable::URI] The normalized URI. + # + # source://addressable//lib/addressable/uri.rb#2173 + def normalize; end + + # Destructively normalizes this URI object. + # + # @return [Addressable::URI] The normalized URI. + # @see Addressable::URI#normalize + # + # source://addressable//lib/addressable/uri.rb#2199 + def normalize!; end + + # The authority component for this URI, normalized. + # + # @return [String] The authority component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1253 + def normalized_authority; end + + # The fragment component for this URI, normalized. + # + # @return [String] The fragment component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1825 + def normalized_fragment; end + + # The host component for this URI, normalized. + # + # @return [String] The host component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1127 + def normalized_host; end + + # The password component for this URI, normalized. + # + # @return [String] The password component, normalized. + # + # source://addressable//lib/addressable/uri.rb#999 + def normalized_password; end + + # The path component for this URI, normalized. + # + # @return [String] The path component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1540 + def normalized_path; end + + # The port component for this URI, normalized. + # + # @return [Integer] The port component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1395 + def normalized_port; end + + # The query component for this URI, normalized. + # + # @return [String] The query component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1620 + def normalized_query(*flags); end + + # The scheme component for this URI, normalized. + # + # @return [String] The scheme component, normalized. + # + # source://addressable//lib/addressable/uri.rb#889 + def normalized_scheme; end + + # The normalized combination of components that represent a site. + # Combines the scheme, user, password, host, and port components. + # Primarily useful for HTTP and HTTPS. + # + # For example, "http://example.com/path?query" would have a + # site value of "http://example.com". + # + # @return [String] The normalized components that identify a site. + # + # source://addressable//lib/addressable/uri.rb#1488 + def normalized_site; end + + # The user component for this URI, normalized. + # + # @return [String] The user component, normalized. + # + # source://addressable//lib/addressable/uri.rb#942 + def normalized_user; end + + # The userinfo component for this URI, normalized. + # + # @return [String] The userinfo component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1067 + def normalized_userinfo; end + + # Omits components from a URI. + # + # @example + # uri = Addressable::URI.parse("http://example.com/path?query") + # #=> # + # uri.omit(:scheme, :authority) + # #=> # + # @param *components [Symbol] The components to be omitted. + # @return [Addressable::URI] The URI with components omitted. + # + # source://addressable//lib/addressable/uri.rb#2306 + def omit(*components); end + + # Destructive form of omit. + # + # @param *components [Symbol] The components to be omitted. + # @return [Addressable::URI] The URI with components omitted. + # @see Addressable::URI#omit + # + # source://addressable//lib/addressable/uri.rb#2333 + def omit!(*components); end + + # The origin for this URI, serialized to ASCII, as per + # RFC 6454, section 6.2. + # + # @return [String] The serialized origin. + # + # source://addressable//lib/addressable/uri.rb#1315 + def origin; end + + # Sets the origin for this URI, serialized to ASCII, as per + # RFC 6454, section 6.2. This assignment will reset the `userinfo` + # component. + # + # @param new_origin [String, #to_str] The new origin component. + # + # source://addressable//lib/addressable/uri.rb#1334 + def origin=(new_origin); end + + # The password component for this URI. + # + # @return [String] The password component. + # + # source://addressable//lib/addressable/uri.rb#991 + def password; end + + # Sets the password component for this URI. + # + # @param new_password [String, #to_str] The new password component. + # + # source://addressable//lib/addressable/uri.rb#1022 + def password=(new_password); end + + # The path component for this URI. + # + # @return [String] The path component. + # + # source://addressable//lib/addressable/uri.rb#1531 + def path; end + + # Sets the path component for this URI. + # + # @param new_path [String, #to_str] The new path component. + # + # source://addressable//lib/addressable/uri.rb#1572 + def path=(new_path); end + + # The port component for this URI. + # This is the port number actually given in the URI. This does not + # infer port numbers from default values. + # + # @return [Integer] The port component. + # + # source://addressable//lib/addressable/uri.rb#1387 + def port; end + + # Sets the port component for this URI. + # + # @param new_port [String, Integer, #to_s] The new port component. + # + # source://addressable//lib/addressable/uri.rb#1411 + def port=(new_port); end + + # The query component for this URI. + # + # @return [String] The query component. + # + # source://addressable//lib/addressable/uri.rb#1612 + def query; end + + # Sets the query component for this URI. + # + # @param new_query [String, #to_str] The new query component. + # + # source://addressable//lib/addressable/uri.rb#1648 + def query=(new_query); end + + # Converts the query component to a Hash value. + # + # @example + # Addressable::URI.parse("?one=1&two=2&three=3").query_values + # #=> {"one" => "1", "two" => "2", "three" => "3"} + # Addressable::URI.parse("?one=two&one=three").query_values(Array) + # #=> [["one", "two"], ["one", "three"]] + # Addressable::URI.parse("?one=two&one=three").query_values(Hash) + # #=> {"one" => "three"} + # Addressable::URI.parse("?").query_values + # #=> {} + # Addressable::URI.parse("").query_values + # #=> nil + # @param return_type [Class] The return type desired. Value must be either + # `Hash` or `Array`. + # @return [Hash, Array, nil] The query string parsed as a Hash or Array + # or nil if the query string is blank. + # + # source://addressable//lib/addressable/uri.rb#1679 + def query_values(return_type = T.unsafe(nil)); end + + # Sets the query component for this URI from a Hash object. + # An empty Hash or Array will result in an empty query string. + # + # @example + # uri.query_values = {:a => "a", :b => ["c", "d", "e"]} + # uri.query + # # => "a=a&b=c&b=d&b=e" + # uri.query_values = [['a', 'a'], ['b', 'c'], ['b', 'd'], ['b', 'e']] + # uri.query + # # => "a=a&b=c&b=d&b=e" + # uri.query_values = [['a', 'a'], ['b', ['c', 'd', 'e']]] + # uri.query + # # => "a=a&b=c&b=d&b=e" + # uri.query_values = [['flag'], ['key', 'value']] + # uri.query + # # => "flag&key=value" + # @param new_query_values [Hash, #to_hash, Array] The new query values. + # + # source://addressable//lib/addressable/uri.rb#1730 + def query_values=(new_query_values); end + + # Determines if the URI is relative. + # + # @return [TrueClass, FalseClass] true if the URI is relative. false + # otherwise. + # + # source://addressable//lib/addressable/uri.rb#1878 + def relative?; end + + # The HTTP request URI for this URI. This is the path and the + # query string. + # + # @return [String] The request URI required for an HTTP request. + # + # source://addressable//lib/addressable/uri.rb#1781 + def request_uri; end + + # Sets the HTTP request URI for this URI. + # + # @param new_request_uri [String, #to_str] The new HTTP request URI. + # + # source://addressable//lib/addressable/uri.rb#1793 + def request_uri=(new_request_uri); end + + # Returns the shortest normalized relative form of this URI that uses the + # supplied URI as a base for resolution. Returns an absolute URI if + # necessary. This is effectively the opposite of route_to. + # + # @param uri [String, Addressable::URI, #to_str] The URI to route from. + # @return [Addressable::URI] The normalized relative URI that is equivalent to the original URI. + # + # source://addressable//lib/addressable/uri.rb#2094 + def route_from(uri); end + + # Returns the shortest normalized relative form of the supplied URI that + # uses this URI as a base for resolution. Returns an absolute URI if + # necessary. This is effectively the opposite of route_from. + # + # @param uri [String, Addressable::URI, #to_str] The URI to route to. + # @return [Addressable::URI] The normalized relative URI that is equivalent to the supplied URI. + # + # source://addressable//lib/addressable/uri.rb#2159 + def route_to(uri); end + + # The scheme component for this URI. + # + # @return [String] The scheme component. + # + # source://addressable//lib/addressable/uri.rb#881 + def scheme; end + + # Sets the scheme component for this URI. + # + # @param new_scheme [String, #to_str] The new scheme component. + # + # source://addressable//lib/addressable/uri.rb#910 + def scheme=(new_scheme); end + + # The combination of components that represent a site. + # Combines the scheme, user, password, host, and port components. + # Primarily useful for HTTP and HTTPS. + # + # For example, "http://example.com/path?query" would have a + # site value of "http://example.com". + # + # @return [String] The components that identify a site. + # + # source://addressable//lib/addressable/uri.rb#1470 + def site; end + + # Sets the site value for this URI. + # + # @param new_site [String, #to_str] The new site value. + # + # source://addressable//lib/addressable/uri.rb#1509 + def site=(new_site); end + + # Returns the top-level domain for this host. + # + # @example + # Addressable::URI.parse("http://www.example.co.uk").tld # => "co.uk" + # + # source://addressable//lib/addressable/uri.rb#1208 + def tld; end + + # Sets the top-level domain for this URI. + # + # @param new_tld [String, #to_str] The new top-level domain. + # + # source://addressable//lib/addressable/uri.rb#1216 + def tld=(new_tld); end + + # Returns a Hash of the URI components. + # + # @return [Hash] The URI as a Hash of components. + # + # source://addressable//lib/addressable/uri.rb#2376 + def to_hash; end + + # Converts the URI to a String. + # + # @return [String] The URI's String representation. + # + # source://addressable//lib/addressable/uri.rb#2350 + def to_s; end + + # Converts the URI to a String. + # URI's are glorified Strings. Allow implicit conversion. + # + # @return [String] The URI's String representation. + # + # source://addressable//lib/addressable/uri.rb#2350 + def to_str; end + + # The user component for this URI. + # + # @return [String] The user component. + # + # source://addressable//lib/addressable/uri.rb#934 + def user; end + + # Sets the user component for this URI. + # + # @param new_user [String, #to_str] The new user component. + # + # source://addressable//lib/addressable/uri.rb#965 + def user=(new_user); end + + # The userinfo component for this URI. + # Combines the user and password components. + # + # @return [String] The userinfo component. + # + # source://addressable//lib/addressable/uri.rb#1051 + def userinfo; end + + # Sets the userinfo component for this URI. + # + # @param new_userinfo [String, #to_str] The new userinfo component. + # + # source://addressable//lib/addressable/uri.rb#1090 + def userinfo=(new_userinfo); end + + protected + + # Converts the string to be UTF-8 if it is not already UTF-8 + # + # @api private + # + # source://addressable//lib/addressable/uri.rb#2554 + def force_utf8_encoding_if_needed(str); end + + # Resets composite values for the entire URI + # + # @api private + # + # source://addressable//lib/addressable/uri.rb#2545 + def remove_composite_values; end + + # Replaces the internal state of self with the specified URI's state. + # Used in destructive operations to avoid massive code repetition. + # + # @param uri [Addressable::URI] The URI to replace self with. + # @return [Addressable::URI] self. + # + # source://addressable//lib/addressable/uri.rb#2508 + def replace_self(uri); end + + # Splits path string with "/" (slash). + # It is considered that there is empty string after last slash when + # path ends with slash. + # + # @param path [String] The path to split. + # @return [Array] An array of parts of path. + # + # source://addressable//lib/addressable/uri.rb#2535 + def split_path(path); end + + # Ensures that the URI is valid. + # + # source://addressable//lib/addressable/uri.rb#2465 + def validate; end + + class << self + # Converts a path to a file scheme URI. If the path supplied is + # relative, it will be returned as a relative URI. If the path supplied + # is actually a non-file URI, it will parse the URI as if it had been + # parsed with Addressable::URI.parse. Handles all of the + # various Microsoft-specific formats for specifying paths. + # + # @example + # base = Addressable::URI.convert_path("/absolute/path/") + # uri = Addressable::URI.convert_path("relative/path") + # (base + uri).to_s + # #=> "file:///absolute/path/relative/path" + # + # Addressable::URI.convert_path( + # "c:\\windows\\My Documents 100%20\\foo.txt" + # ).to_s + # #=> "file:///c:/windows/My%20Documents%20100%20/foo.txt" + # + # Addressable::URI.convert_path("http://example.com/").to_s + # #=> "http://example.com/" + # @param path [String, Addressable::URI, #to_str] Typically a String path to a file or directory, but + # will return a sensible return value if an absolute URI is supplied + # instead. + # @return [Addressable::URI] The parsed file scheme URI or the original URI if some other URI + # scheme was provided. + # + # source://addressable//lib/addressable/uri.rb#279 + def convert_path(path); end + + # Percent encodes any special characters in the URI. + # + # @param uri [String, Addressable::URI, #to_str] The URI to encode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @return [String, Addressable::URI] The encoded URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#609 + def encode(uri, return_type = T.unsafe(nil)); end + + # Percent encodes a URI component. + # + # '9' to be percent encoded. If a Regexp is passed, the + # value /[^b-zB-Z0-9]/ would have the same effect. A set of + # useful String values may be found in the + # Addressable::URI::CharacterClasses module. The default + # value is the reserved plus unreserved character classes specified in + # RFC 3986. + # + # @example + # Addressable::URI.encode_component("simple/example", "b-zB-Z0-9") + # => "simple%2Fex%61mple" + # Addressable::URI.encode_component("simple/example", /[^b-zB-Z0-9]/) + # => "simple%2Fex%61mple" + # Addressable::URI.encode_component( + # "simple/example", Addressable::URI::CharacterClasses::UNRESERVED + # ) + # => "simple%2Fexample" + # @param component [String, #to_str] The URI component to encode. + # @param character_class [String, Regexp] The characters which are not percent encoded. If a String + # is passed, the String must be formatted as a regular + # expression character class. (Do not include the surrounding square + # brackets.) For example, "b-zB-Z0-9" would cause + # everything but the letters 'b' through 'z' and the numbers '0' through + # @param upcase_encoded [Regexp] A string of characters that may already be percent encoded, and whose + # encodings should be upcased. This allows normalization of percent + # encodings for characters not included in the + # character_class. + # @return [String] The encoded component. + # + # source://addressable//lib/addressable/uri.rb#394 + def encode_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end + + # Percent encodes any special characters in the URI. + # + # @param uri [String, Addressable::URI, #to_str] The URI to encode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @return [String, Addressable::URI] The encoded URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#609 + def escape(uri, return_type = T.unsafe(nil)); end + + # Percent encodes a URI component. + # + # '9' to be percent encoded. If a Regexp is passed, the + # value /[^b-zB-Z0-9]/ would have the same effect. A set of + # useful String values may be found in the + # Addressable::URI::CharacterClasses module. The default + # value is the reserved plus unreserved character classes specified in + # RFC 3986. + # + # @example + # Addressable::URI.encode_component("simple/example", "b-zB-Z0-9") + # => "simple%2Fex%61mple" + # Addressable::URI.encode_component("simple/example", /[^b-zB-Z0-9]/) + # => "simple%2Fex%61mple" + # Addressable::URI.encode_component( + # "simple/example", Addressable::URI::CharacterClasses::UNRESERVED + # ) + # => "simple%2Fexample" + # @param component [String, #to_str] The URI component to encode. + # @param character_class [String, Regexp] The characters which are not percent encoded. If a String + # is passed, the String must be formatted as a regular + # expression character class. (Do not include the surrounding square + # brackets.) For example, "b-zB-Z0-9" would cause + # everything but the letters 'b' through 'z' and the numbers '0' through + # @param upcase_encoded [Regexp] A string of characters that may already be percent encoded, and whose + # encodings should be upcased. This allows normalization of percent + # encodings for characters not included in the + # character_class. + # @return [String] The encoded component. + # + # source://addressable//lib/addressable/uri.rb#394 + def escape_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end + + # Encodes a set of key/value pairs according to the rules for the + # application/x-www-form-urlencoded MIME type. + # + # @param form_values [#to_hash, #to_ary] The form values to encode. + # @param sort [TrueClass, FalseClass] Sort the key/value pairs prior to encoding. + # Defaults to false. + # @return [String] The encoded value. + # + # source://addressable//lib/addressable/uri.rb#734 + def form_encode(form_values, sort = T.unsafe(nil)); end + + # Decodes a String according to the rules for the + # application/x-www-form-urlencoded MIME type. + # + # @param encoded_value [String, #to_str] The form values to decode. + # @return [Array] The decoded values. + # This is not a Hash because of the possibility for + # duplicate keys. + # + # source://addressable//lib/addressable/uri.rb#787 + def form_unencode(encoded_value); end + + # Converts an input to a URI. The input does not have to be a valid + # URI — the method will use heuristics to guess what URI was intended. + # This is not standards-compliant, merely user-friendly. + # + # @param uri [String, Addressable::URI, #to_str] The URI string to parse. + # No parsing is performed if the object is already an + # Addressable::URI. + # @param hints [Hash] A Hash of hints to the heuristic parser. + # Defaults to {:scheme => "http"}. + # @return [Addressable::URI] The parsed URI. + # + # source://addressable//lib/addressable/uri.rb#178 + def heuristic_parse(uri, hints = T.unsafe(nil)); end + + # Returns an array of known ip-based schemes. These schemes typically + # use a similar URI form: + # //:@:/ + # + # source://addressable//lib/addressable/uri.rb#1370 + def ip_based_schemes; end + + # Joins several URIs together. + # + # @example + # base = "http://example.com/" + # uri = Addressable::URI.parse("relative/path") + # Addressable::URI.join(base, uri) + # #=> # + # @param *uris [String, Addressable::URI, #to_str] The URIs to join. + # @return [Addressable::URI] The joined URI. + # + # source://addressable//lib/addressable/uri.rb#330 + def join(*uris); end + + # Normalizes the encoding of a URI component. + # + # @example + # Addressable::URI.normalize_component("simpl%65/%65xampl%65", "b-zB-Z") + # => "simple%2Fex%61mple" + # Addressable::URI.normalize_component( + # "simpl%65/%65xampl%65", /[^b-zB-Z]/ + # ) + # => "simple%2Fex%61mple" + # Addressable::URI.normalize_component( + # "simpl%65/%65xampl%65", + # Addressable::URI::CharacterClasses::UNRESERVED + # ) + # => "simple%2Fexample" + # Addressable::URI.normalize_component( + # "one%20two%2fthree%26four", + # "0-9a-zA-Z &/", + # "/" + # ) + # => "one two%2Fthree&four" + # @param component [String, #to_str] The URI component to encode. + # @param character_class [String, Regexp] The characters which are not percent encoded. If a String + # is passed, the String must be formatted as a regular + # expression character class. (Do not include the surrounding square + # brackets.) For example, "b-zB-Z0-9" would cause + # everything but the letters 'b' through 'z' and the numbers '0' + # through '9' to be percent encoded. If a Regexp is passed, + # the value /[^b-zB-Z0-9]/ would have the same effect. A + # set of useful String values may be found in the + # Addressable::URI::CharacterClasses module. The default + # value is the reserved plus unreserved character classes specified in + # RFC 3986. + # @param leave_encoded [String] When character_class is a String then + # leave_encoded is a string of characters that should remain + # percent encoded while normalizing the component; if they appear percent + # encoded in the original component, then they will be upcased ("%2f" + # normalized to "%2F") but otherwise left alone. + # @return [String] The normalized component. + # + # source://addressable//lib/addressable/uri.rb#544 + def normalize_component(component, character_class = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end + + # Resolves paths to their simplest form. + # + # @param path [String] The path to normalize. + # @return [String] The normalized path. + # + # source://addressable//lib/addressable/uri.rb#2429 + def normalize_path(path); end + + # Normalizes the encoding of a URI. Characters within a hostname are + # not percent encoded to allow for internationalized domain names. + # + # @param uri [String, Addressable::URI, #to_str] The URI to encode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @return [String, Addressable::URI] The encoded URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#664 + def normalized_encode(uri, return_type = T.unsafe(nil)); end + + # Returns a URI object based on the parsed string. + # + # @param uri [String, Addressable::URI, #to_str] The URI string to parse. + # No parsing is performed if the object is already an + # Addressable::URI. + # @return [Addressable::URI] The parsed URI. + # + # source://addressable//lib/addressable/uri.rb#101 + def parse(uri); end + + # Returns a hash of common IP-based schemes and their default port + # numbers. Adding new schemes to this hash, as necessary, will allow + # for better URI normalization. + # + # source://addressable//lib/addressable/uri.rb#1377 + def port_mapping; end + + # Unencodes any percent encoded characters within a URI component. + # This method may be used for unencoding either components or full URIs, + # however, it is recommended to use the unencode_component + # alias when unencoding components. + # + # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character + # in this list is encountered then it will remain percent encoded. + # @return [String, Addressable::URI] The unencoded component or URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#464 + def unencode(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end + + # Unencodes any percent encoded characters within a URI component. + # This method may be used for unencoding either components or full URIs, + # however, it is recommended to use the unencode_component + # alias when unencoding components. + # + # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character + # in this list is encountered then it will remain percent encoded. + # @return [String, Addressable::URI] The unencoded component or URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#464 + def unencode_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end + + # Unencodes any percent encoded characters within a URI component. + # This method may be used for unencoding either components or full URIs, + # however, it is recommended to use the unencode_component + # alias when unencoding components. + # + # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character + # in this list is encountered then it will remain percent encoded. + # @return [String, Addressable::URI] The unencoded component or URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#464 + def unescape(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end + + # Unencodes any percent encoded characters within a URI component. + # This method may be used for unencoding either components or full URIs, + # however, it is recommended to use the unencode_component + # alias when unencoding components. + # + # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character + # in this list is encountered then it will remain percent encoded. + # @return [String, Addressable::URI] The unencoded component or URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#464 + def unescape_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end + end +end + +# Container for the character classes specified in +# RFC 3986. +# +# Note: Concatenated and interpolated `String`s are not affected by the +# `frozen_string_literal` directive and must be frozen explicitly. +# +# Interpolated `String`s *were* frozen this way before Ruby 3.0: +# https://bugs.ruby-lang.org/issues/17104 +# +# source://addressable//lib/addressable/uri.rb#46 +module Addressable::URI::CharacterClasses; end + +# source://addressable//lib/addressable/uri.rb#47 +Addressable::URI::CharacterClasses::ALPHA = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#56 +Addressable::URI::CharacterClasses::AUTHORITY = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#48 +Addressable::URI::CharacterClasses::DIGIT = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#59 +Addressable::URI::CharacterClasses::FRAGMENT = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#49 +Addressable::URI::CharacterClasses::GEN_DELIMS = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#55 +Addressable::URI::CharacterClasses::HOST = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#57 +Addressable::URI::CharacterClasses::PATH = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#53 +Addressable::URI::CharacterClasses::PCHAR = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#58 +Addressable::URI::CharacterClasses::QUERY = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#51 +Addressable::URI::CharacterClasses::RESERVED = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#54 +Addressable::URI::CharacterClasses::SCHEME = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#50 +Addressable::URI::CharacterClasses::SUB_DELIMS = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#52 +Addressable::URI::CharacterClasses::UNRESERVED = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#72 +Addressable::URI::EMPTY_STR = T.let(T.unsafe(nil), String) + +# Raised if something other than a uri is supplied. +# +# source://addressable//lib/addressable/uri.rb#34 +class Addressable::URI::InvalidURIError < ::StandardError; end + +# source://addressable//lib/addressable/uri.rb#1535 +Addressable::URI::NORMPATH = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#62 +module Addressable::URI::NormalizeCharacterClasses; end + +# source://addressable//lib/addressable/uri.rb#67 +Addressable::URI::NormalizeCharacterClasses::FRAGMENT = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#63 +Addressable::URI::NormalizeCharacterClasses::HOST = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#65 +Addressable::URI::NormalizeCharacterClasses::PCHAR = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#68 +Addressable::URI::NormalizeCharacterClasses::QUERY = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#66 +Addressable::URI::NormalizeCharacterClasses::SCHEME = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#64 +Addressable::URI::NormalizeCharacterClasses::UNRESERVED = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#2416 +Addressable::URI::PARENT = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#76 +Addressable::URI::PORT_MAPPING = T.let(T.unsafe(nil), Hash) + +# source://addressable//lib/addressable/uri.rb#2418 +Addressable::URI::RULE_2A = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#2419 +Addressable::URI::RULE_2B_2C = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#2420 +Addressable::URI::RULE_2D = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#2421 +Addressable::URI::RULE_PREFIXED_PARENT = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#2415 +Addressable::URI::SELF_REF = T.let(T.unsafe(nil), String) + +# Tables used to optimize encoding operations in `self.encode_component` +# and `self.normalize_component` +# +# source://addressable//lib/addressable/uri.rb#347 +Addressable::URI::SEQUENCE_ENCODING_TABLE = T.let(T.unsafe(nil), Hash) + +# source://addressable//lib/addressable/uri.rb#353 +Addressable::URI::SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE = T.let(T.unsafe(nil), Hash) + +# source://addressable//lib/addressable/uri.rb#71 +Addressable::URI::SLASH = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#74 +Addressable::URI::URIREGEX = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/version.rb#23 +module Addressable::VERSION; end + +# source://addressable//lib/addressable/version.rb#24 +Addressable::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/version.rb#25 +Addressable::VERSION::MINOR = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/version.rb#28 +Addressable::VERSION::STRING = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/version.rb#26 +Addressable::VERSION::TINY = T.let(T.unsafe(nil), Integer) diff --git a/sorbet/rbi/gems/ast@2.4.2.rbi b/sorbet/rbi/gems/ast@2.4.2.rbi new file mode 100644 index 0000000..3fc4495 --- /dev/null +++ b/sorbet/rbi/gems/ast@2.4.2.rbi @@ -0,0 +1,584 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ast` gem. +# Please instead update this file by running `bin/tapioca gem ast`. + +# {AST} is a library for manipulating abstract syntax trees. +# +# It embraces immutability; each AST node is inherently frozen at +# creation, and updating a child node requires recreating that node +# and its every parent, recursively. +# This is a design choice. It does create some pressure on +# garbage collector, but completely eliminates all concurrency +# and aliasing problems. +# +# See also {AST::Node}, {AST::Processor::Mixin} and {AST::Sexp} for +# additional recommendations and design patterns. +# +# source://ast//lib/ast.rb#13 +module AST; end + +# Node is an immutable class, instances of which represent abstract +# syntax tree nodes. It combines semantic information (i.e. anything +# that affects the algorithmic properties of a program) with +# meta-information (line numbers or compiler intermediates). +# +# Notes on inheritance +# ==================== +# +# The distinction between semantics and metadata is important. Complete +# semantic information should be contained within just the {#type} and +# {#children} of a Node instance; in other words, if an AST was to be +# stripped of all meta-information, it should remain a valid AST which +# could be successfully processed to yield a result with the same +# algorithmic properties. +# +# Thus, Node should never be inherited in order to define methods which +# affect or return semantic information, such as getters for `class_name`, +# `superclass` and `body` in the case of a hypothetical `ClassNode`. The +# correct solution is to use a generic Node with a {#type} of `:class` +# and three children. See also {Processor} for tips on working with such +# ASTs. +# +# On the other hand, Node can and should be inherited to define +# application-specific metadata (see also {#initialize}) or customize the +# printing format. It is expected that an application would have one or two +# such classes and use them across the entire codebase. +# +# The rationale for this pattern is extensibility and maintainability. +# Unlike static ones, dynamic languages do not require the presence of a +# predefined, rigid structure, nor does it improve dispatch efficiency, +# and while such a structure can certainly be defined, it does not add +# any value but incurs a maintaining cost. +# For example, extending the AST even with a transformation-local +# temporary node type requires making globally visible changes to +# the codebase. +# +# source://ast//lib/ast/node.rb#40 +class AST::Node + # Constructs a new instance of Node. + # + # The arguments `type` and `children` are converted with `to_sym` and + # `to_a` respectively. Additionally, the result of converting `children` + # is frozen. While mutating the arguments is generally considered harmful, + # the most common case is to pass an array literal to the constructor. If + # your code does not expect the argument to be frozen, use `#dup`. + # + # The `properties` hash is passed to {#assign_properties}. + # + # @return [Node] a new instance of Node + # + # source://ast//lib/ast/node.rb#72 + def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end + + # Concatenates `array` with `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#168 + def +(array); end + + # Appends `element` to `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#177 + def <<(element); end + + # Compares `self` to `other`, possibly converting with `to_ast`. Only + # `type` and `children` are compared; metadata is deliberately ignored. + # + # @return [Boolean] + # + # source://ast//lib/ast/node.rb#153 + def ==(other); end + + # Appends `element` to `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#177 + def append(element); end + + # Returns the children of this node. + # The returned value is frozen. + # The to_a alias is useful for decomposing nodes concisely. + # For example: + # + # node = s(:gasgn, :$foo, s(:integer, 1)) + # var_name, value = *node + # p var_name # => :$foo + # p value # => (integer 1) + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#56 + def children; end + + # Nodes are already frozen, so there is no harm in returning the + # current node as opposed to initializing from scratch and freezing + # another one. + # + # @return self + # + # source://ast//lib/ast/node.rb#115 + def clone; end + + # Concatenates `array` with `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#168 + def concat(array); end + + # Enables matching for Node, where type is the first element + # and the children are remaining items. + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#253 + def deconstruct; end + + # Nodes are already frozen, so there is no harm in returning the + # current node as opposed to initializing from scratch and freezing + # another one. + # + # @return self + # + # source://ast//lib/ast/node.rb#115 + def dup; end + + # Test if other object is equal to + # + # @param other [Object] + # @return [Boolean] + # + # source://ast//lib/ast/node.rb#85 + def eql?(other); end + + # Returns the precomputed hash value for this node + # + # @return [Fixnum] + # + # source://ast//lib/ast/node.rb#61 + def hash; end + + # Converts `self` to a s-expression ruby string. + # The code return will recreate the node, using the sexp module s() + # + # @param indent [Integer] Base indentation level. + # @return [String] + # + # source://ast//lib/ast/node.rb#211 + def inspect(indent = T.unsafe(nil)); end + + # Returns the children of this node. + # The returned value is frozen. + # The to_a alias is useful for decomposing nodes concisely. + # For example: + # + # node = s(:gasgn, :$foo, s(:integer, 1)) + # var_name, value = *node + # p var_name # => :$foo + # p value # => (integer 1) + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#56 + def to_a; end + + # @return [AST::Node] self + # + # source://ast//lib/ast/node.rb#229 + def to_ast; end + + # Converts `self` to a pretty-printed s-expression. + # + # @param indent [Integer] Base indentation level. + # @return [String] + # + # source://ast//lib/ast/node.rb#187 + def to_s(indent = T.unsafe(nil)); end + + # Converts `self` to a pretty-printed s-expression. + # + # @param indent [Integer] Base indentation level. + # @return [String] + # + # source://ast//lib/ast/node.rb#187 + def to_sexp(indent = T.unsafe(nil)); end + + # Converts `self` to an Array where the first element is the type as a Symbol, + # and subsequent elements are the same representation of its children. + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#237 + def to_sexp_array; end + + # Returns the type of this node. + # + # @return [Symbol] + # + # source://ast//lib/ast/node.rb#43 + def type; end + + # Returns a new instance of Node where non-nil arguments replace the + # corresponding fields of `self`. + # + # For example, `Node.new(:foo, [ 1, 2 ]).updated(:bar)` would yield + # `(bar 1 2)`, and `Node.new(:foo, [ 1, 2 ]).updated(nil, [])` would + # yield `(foo)`. + # + # If the resulting node would be identical to `self`, does nothing. + # + # @param type [Symbol, nil] + # @param children [Array, nil] + # @param properties [Hash, nil] + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#133 + def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end + + protected + + # By default, each entry in the `properties` hash is assigned to + # an instance variable in this instance of Node. A subclass should define + # attribute readers for such variables. The values passed in the hash + # are not frozen or whitelisted; such behavior can also be implemented + # by subclassing Node and overriding this method. + # + # @return [nil] + # + # source://ast//lib/ast/node.rb#98 + def assign_properties(properties); end + + # Returns `@type` with all underscores replaced by dashes. This allows + # to write symbol literals without quotes in Ruby sources and yet have + # nicely looking s-expressions. + # + # @return [String] + # + # source://ast//lib/ast/node.rb#264 + def fancy_type; end + + private + + def original_dup; end +end + +# This class includes {AST::Processor::Mixin}; however, it is +# deprecated, since the module defines all of the behaviors that +# the processor includes. Any new libraries should use +# {AST::Processor::Mixin} instead of subclassing this. +# +# @deprecated Use {AST::Processor::Mixin} instead. +# +# source://ast//lib/ast/processor.rb#8 +class AST::Processor + include ::AST::Processor::Mixin +end + +# The processor module is a module which helps transforming one +# AST into another. In a nutshell, the {#process} method accepts +# a {Node} and dispatches it to a handler corresponding to its +# type, and returns a (possibly) updated variant of the node. +# +# The processor module has a set of associated design patterns. +# They are best explained with a concrete example. Let's define a +# simple arithmetic language and an AST format for it: +# +# Terminals (AST nodes which do not have other AST nodes inside): +# +# * `(integer )`, +# +# Nonterminals (AST nodes with other nodes as children): +# +# * `(add )`, +# * `(multiply )`, +# * `(divide )`, +# * `(negate )`, +# * `(store )`: stores value of `` +# into a variable named ``, +# * `(load )`: loads value of a variable named +# ``, +# * `(each ...)`: computes each of the ``s and +# prints the result. +# +# All AST nodes have the same Ruby class, and therefore they don't +# know how to traverse themselves. (A solution which dynamically +# checks the type of children is possible, but is slow and +# error-prone.) So, a class including the module which knows how +# to traverse the entire tree should be defined. Such classes +# have a handler for each nonterminal node which recursively +# processes children nodes: +# +# require 'ast' +# +# class ArithmeticsProcessor +# include AST::Processor::Mixin +# # This method traverses any binary operators such as (add) +# # or (multiply). +# def process_binary_op(node) +# # Children aren't decomposed automatically; it is +# # suggested to use Ruby multiple assignment expansion, +# # as it is very convenient here. +# left_expr, right_expr = *node +# +# # AST::Node#updated won't change node type if nil is +# # passed as a first argument, which allows to reuse the +# # same handler for multiple node types using `alias' +# # (below). +# node.updated(nil, [ +# process(left_expr), +# process(right_expr) +# ]) +# end +# alias_method :on_add, :process_binary_op +# alias_method :on_multiply, :process_binary_op +# alias_method :on_divide, :process_binary_op +# +# def on_negate(node) +# # It is also possible to use #process_all for more +# # compact code if every child is a Node. +# node.updated(nil, process_all(node)) +# end +# +# def on_store(node) +# expr, variable_name = *node +# +# # Note that variable_name is not a Node and thus isn't +# # passed to #process. +# node.updated(nil, [ +# process(expr), +# variable_name +# ]) +# end +# +# # (load) is effectively a terminal node, and so it does +# # not need an explicit handler, as the following is the +# # default behavior. Essentially, for any nodes that don't +# # have a defined handler, the node remains unchanged. +# def on_load(node) +# nil +# end +# +# def on_each(node) +# node.updated(nil, process_all(node)) +# end +# end +# +# Let's test our ArithmeticsProcessor: +# +# include AST::Sexp +# expr = s(:add, s(:integer, 2), s(:integer, 2)) +# +# p ArithmeticsProcessor.new.process(expr) == expr # => true +# +# As expected, it does not change anything at all. This isn't +# actually very useful, so let's now define a Calculator, which +# will compute the expression values: +# +# # This Processor folds nonterminal nodes and returns an +# # (integer) terminal node. +# class ArithmeticsCalculator < ArithmeticsProcessor +# def compute_op(node) +# # First, node children are processed and then unpacked +# # to local variables. +# nodes = process_all(node) +# +# if nodes.all? { |node| node.type == :integer } +# # If each of those nodes represents a literal, we can +# # fold this node! +# values = nodes.map { |node| node.children.first } +# AST::Node.new(:integer, [ +# yield(values) +# ]) +# else +# # Otherwise, we can just leave the current node in the +# # tree and only update it with processed children +# # nodes, which can be partially folded. +# node.updated(nil, nodes) +# end +# end +# +# def on_add(node) +# compute_op(node) { |left, right| left + right } +# end +# +# def on_multiply(node) +# compute_op(node) { |left, right| left * right } +# end +# end +# +# Let's check: +# +# p ArithmeticsCalculator.new.process(expr) # => (integer 4) +# +# Excellent, the calculator works! Now, a careful reader could +# notice that the ArithmeticsCalculator does not know how to +# divide numbers. What if we pass an expression with division to +# it? +# +# expr_with_division = \ +# s(:add, +# s(:integer, 1), +# s(:divide, +# s(:add, s(:integer, 8), s(:integer, 4)), +# s(:integer, 3))) # 1 + (8 + 4) / 3 +# +# folded_expr_with_division = ArithmeticsCalculator.new.process(expr_with_division) +# p folded_expr_with_division +# # => (add +# # (integer 1) +# # (divide +# # (integer 12) +# # (integer 3))) +# +# As you can see, the expression was folded _partially_: the inner +# `(add)` node which could be computed was folded to +# `(integer 12)`, the `(divide)` node is left as-is because there +# is no computing handler for it, and the root `(add)` node was +# also left as it is because some of its children were not +# literals. +# +# Note that this partial folding is only possible because the +# _data_ format, i.e. the format in which the computed values of +# the nodes are represented, is the same as the AST itself. +# +# Let's extend our ArithmeticsCalculator class further. +# +# class ArithmeticsCalculator +# def on_divide(node) +# compute_op(node) { |left, right| left / right } +# end +# +# def on_negate(node) +# # Note how #compute_op works regardless of the operator +# # arity. +# compute_op(node) { |value| -value } +# end +# end +# +# Now, let's apply our renewed ArithmeticsCalculator to a partial +# result of previous evaluation: +# +# p ArithmeticsCalculator.new.process(expr_with_division) # => (integer 5) +# +# Five! Excellent. This is also pretty much how CRuby 1.8 executed +# its programs. +# +# Now, let's do some automated bug searching. Division by zero is +# an error, right? So if we could detect that someone has divided +# by zero before the program is even run, that could save some +# debugging time. +# +# class DivisionByZeroVerifier < ArithmeticsProcessor +# class VerificationFailure < Exception; end +# +# def on_divide(node) +# # You need to process the children to handle nested divisions +# # such as: +# # (divide +# # (integer 1) +# # (divide (integer 1) (integer 0)) +# left, right = process_all(node) +# +# if right.type == :integer && +# right.children.first == 0 +# raise VerificationFailure, "Ouch! This code divides by zero." +# end +# end +# +# def divides_by_zero?(ast) +# process(ast) +# false +# rescue VerificationFailure +# true +# end +# end +# +# nice_expr = \ +# s(:divide, +# s(:add, s(:integer, 10), s(:integer, 2)), +# s(:integer, 4)) +# +# p DivisionByZeroVerifier.new.divides_by_zero?(nice_expr) +# # => false. Good. +# +# bad_expr = \ +# s(:add, s(:integer, 10), +# s(:divide, s(:integer, 1), s(:integer, 0))) +# +# p DivisionByZeroVerifier.new.divides_by_zero?(bad_expr) +# # => true. WHOOPS. DO NOT RUN THIS. +# +# Of course, this won't detect more complex cases... unless you +# use some partial evaluation before! The possibilites are +# endless. Have fun. +# +# source://ast//lib/ast/processor/mixin.rb#240 +module AST::Processor::Mixin + # Default handler. Does nothing. + # + # @param node [AST::Node] + # @return [AST::Node, nil] + # + # source://ast//lib/ast/processor/mixin.rb#284 + def handler_missing(node); end + + # Dispatches `node`. If a node has type `:foo`, then a handler + # named `on_foo` is invoked with one argument, the `node`; if + # there isn't such a handler, {#handler_missing} is invoked + # with the same argument. + # + # If the handler returns `nil`, `node` is returned; otherwise, + # the return value of the handler is passed along. + # + # @param node [AST::Node, nil] + # @return [AST::Node, nil] + # + # source://ast//lib/ast/processor/mixin.rb#251 + def process(node); end + + # {#process}es each node from `nodes` and returns an array of + # results. + # + # @param nodes [Array] + # @return [Array] + # + # source://ast//lib/ast/processor/mixin.rb#274 + def process_all(nodes); end +end + +# This simple module is very useful in the cases where one needs +# to define deeply nested ASTs from Ruby code, for example, in +# tests. It should be used like this: +# +# describe YourLanguage::AST do +# include Sexp +# +# it "should correctly parse expressions" do +# YourLanguage.parse("1 + 2 * 3").should == +# s(:add, +# s(:integer, 1), +# s(:multiply, +# s(:integer, 2), +# s(:integer, 3))) +# end +# end +# +# This way the amount of boilerplate code is greatly reduced. +# +# source://ast//lib/ast/sexp.rb#20 +module AST::Sexp + # Creates a {Node} with type `type` and children `children`. + # Note that the resulting node is of the type AST::Node and not a + # subclass. + # This would not pose a problem with comparisons, as {Node#==} + # ignores metadata. + # + # source://ast//lib/ast/sexp.rb#26 + def s(type, *children); end +end diff --git a/sorbet/rbi/gems/builder@3.2.4.rbi b/sorbet/rbi/gems/builder@3.2.4.rbi new file mode 100644 index 0000000..f99d492 --- /dev/null +++ b/sorbet/rbi/gems/builder@3.2.4.rbi @@ -0,0 +1,504 @@ +# 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`. + +# If the Builder::XChar module is not currently defined, fail on any +# name clashes in standard library classes. +# +# source://builder//lib/builder/blankslate.rb#17 +module Builder + class << self + # source://builder//lib/builder/xchar.rb#13 + def check_for_name_collision(klass, method_name, defined_constant = T.unsafe(nil)); end + end +end + +# source://builder//lib/builder/blankslate.rb#19 +Builder::BlankSlate = BasicObject + +# Generic error for builder +# +# source://builder//lib/builder/xmlbase.rb#9 +class Builder::IllegalBlockError < ::RuntimeError; end + +# source://builder//lib/builder/xchar.rb#33 +module Builder::XChar + class << self + # encode a string per XML rules + # + # source://builder//lib/builder/xchar.rb#152 + def encode(string); end + + # convert a string to valid UTF-8, compensating for a number of + # common errors. + # + # source://builder//lib/builder/xchar.rb#126 + def unicode(string); end + end +end + +# See +# http://intertwingly.net/stories/2004/04/14/i18n.html#CleaningWindows +# for details. +# +# source://builder//lib/builder/xchar.rb#38 +Builder::XChar::CP1252 = T.let(T.unsafe(nil), Hash) + +# source://builder//lib/builder/xchar.rb#100 +Builder::XChar::CP1252_DIFFERENCES = T.let(T.unsafe(nil), String) + +# source://builder//lib/builder/xchar.rb#120 +Builder::XChar::ENCODING_BINARY = T.let(T.unsafe(nil), Encoding) + +# source://builder//lib/builder/xchar.rb#122 +Builder::XChar::ENCODING_ISO1 = T.let(T.unsafe(nil), Encoding) + +# source://builder//lib/builder/xchar.rb#121 +Builder::XChar::ENCODING_UTF8 = T.let(T.unsafe(nil), Encoding) + +# source://builder//lib/builder/xchar.rb#109 +Builder::XChar::INVALID_XML_CHAR = T.let(T.unsafe(nil), Regexp) + +# See http://www.w3.org/TR/REC-xml/#dt-chardata for details. +# +# source://builder//lib/builder/xchar.rb#69 +Builder::XChar::PREDEFINED = T.let(T.unsafe(nil), Hash) + +# http://www.fileformat.info/info/unicode/char/fffd/index.htm +# +# source://builder//lib/builder/xchar.rb#84 +Builder::XChar::REPLACEMENT_CHAR = T.let(T.unsafe(nil), String) + +# source://builder//lib/builder/xchar.rb#100 +Builder::XChar::UNICODE_EQUIVALENT = T.let(T.unsafe(nil), String) + +# See http://www.w3.org/TR/REC-xml/#charsets for details. +# +# source://builder//lib/builder/xchar.rb#76 +Builder::XChar::VALID = T.let(T.unsafe(nil), Array) + +# source://builder//lib/builder/xchar.rb#105 +Builder::XChar::XML_PREDEFINED = T.let(T.unsafe(nil), Regexp) + +# XmlBase is a base class for building XML builders. See +# Builder::XmlMarkup and Builder::XmlEvents for examples. +# +# source://builder//lib/builder/xmlbase.rb#13 +class Builder::XmlBase < ::BasicObject + # Create an XML markup builder. + # + # out :: Object receiving the markup. +out+ must respond to + # <<. + # indent :: Number of spaces used for indentation (0 implies no + # indentation and no line breaks). + # initial :: Level of initial indentation. + # encoding :: When encoding and $KCODE are set to 'utf-8' + # characters aren't converted to character entities in + # the output stream. + # + # @return [XmlBase] a new instance of XmlBase + # + # source://builder//lib/builder/xmlbase.rb#29 + def initialize(indent = T.unsafe(nil), initial = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # Append text to the output target without escaping any markup. + # May be used within the markup brackets as: + # + # builder.p { |x| x << "
    HI" } #=>


    HI

    + # + # This is useful when using non-builder enabled software that + # generates strings. Just insert the string directly into the + # builder without changing the inserted markup. + # + # It is also useful for stacking builder objects. Builders only + # use << to append to the target, so by supporting this + # method/operation builders can use other builders as their + # targets. + # + # source://builder//lib/builder/xmlbase.rb#118 + def <<(text); end + + # @return [Boolean] + # + # source://builder//lib/builder/xmlbase.rb#35 + def explicit_nil_handling?; end + + # Create XML markup based on the name of the method. This method + # is never invoked directly, but is called for each markup method + # in the markup block that isn't cached. + # + # source://builder//lib/builder/xmlbase.rb#92 + def method_missing(sym, *args, &block); end + + # For some reason, nil? is sent to the XmlMarkup object. If nil? + # is not defined and method_missing is invoked, some strange kind + # of recursion happens. Since nil? won't ever be an XML tag, it + # is pretty safe to define it here. (Note: this is an example of + # cargo cult programming, + # cf. http://fishbowl.pastiche.org/2004/10/13/cargo_cult_programming). + # + # @return [Boolean] + # + # source://builder//lib/builder/xmlbase.rb#128 + def nil?; end + + # Create a tag named +sym+. Other than the first argument which + # is the tag name, the arguments are the same as the tags + # implemented via method_missing. + # + # source://builder//lib/builder/xmlbase.rb#42 + def tag!(sym, *args, &block); end + + # Append text to the output target. Escape any markup. May be + # used within the markup brackets as: + # + # builder.p { |b| b.br; b.text! "HI" } #=>


    HI

    + # + # source://builder//lib/builder/xmlbase.rb#101 + def text!(text); end + + private + + # source://builder//lib/builder/xmlbase.rb#136 + def _escape(text); end + + # source://builder//lib/builder/xmlbase.rb#159 + def _escape_attribute(text); end + + # source://builder//lib/builder/xmlbase.rb#169 + def _indent; end + + # source://builder//lib/builder/xmlbase.rb#174 + def _nested_structures(block); end + + # source://builder//lib/builder/xmlbase.rb#164 + def _newline; end + + # If XmlBase.cache_method_calls = true, we dynamicly create the method + # missed as an instance method on the XMLBase object. Because XML + # documents are usually very repetative in nature, the next node will + # be handled by the new method instead of method_missing. As + # method_missing is very slow, this speeds up document generation + # significantly. + # + # source://builder//lib/builder/xmlbase.rb#187 + def cache_method_call(sym); end + + class << self + # Returns the value of attribute cache_method_calls. + # + # source://builder//lib/builder/xmlbase.rb#16 + def cache_method_calls; end + + # Sets the attribute cache_method_calls + # + # @param value the value to set the attribute cache_method_calls to. + # + # source://builder//lib/builder/xmlbase.rb#16 + def cache_method_calls=(_arg0); end + end +end + +# Create a series of SAX-like XML events (e.g. start_tag, end_tag) +# from the markup code. XmlEvent objects are used in a way similar +# to XmlMarkup objects, except that a series of events are generated +# and passed to a handler rather than generating character-based +# markup. +# +# Usage: +# xe = Builder::XmlEvents.new(hander) +# xe.title("HI") # Sends start_tag/end_tag/text messages to the handler. +# +# Indentation may also be selected by providing value for the +# indentation size and initial indentation level. +# +# xe = Builder::XmlEvents.new(handler, indent_size, initial_indent_level) +# +# == XML Event Handler +# +# The handler object must expect the following events. +# +# [start_tag(tag, attrs)] +# Announces that a new tag has been found. +tag+ is the name of +# the tag and +attrs+ is a hash of attributes for the tag. +# +# [end_tag(tag)] +# Announces that an end tag for +tag+ has been found. +# +# [text(text)] +# Announces that a string of characters (+text+) has been found. +# A series of characters may be broken up into more than one +# +text+ call, so the client cannot assume that a single +# callback contains all the text data. +# +# source://builder//lib/builder/xmlevents.rb#49 +class Builder::XmlEvents < ::Builder::XmlMarkup + # source://builder//lib/builder/xmlevents.rb#59 + def _end_tag(sym); end + + # source://builder//lib/builder/xmlevents.rb#54 + def _start_tag(sym, attrs, end_too = T.unsafe(nil)); end + + # source://builder//lib/builder/xmlevents.rb#50 + def text!(text); end +end + +# Create XML markup easily. All (well, almost all) methods sent to +# an XmlMarkup object will be translated to the equivalent XML +# markup. Any method with a block will be treated as an XML markup +# tag with nested markup in the block. +# +# Examples will demonstrate this easier than words. In the +# following, +xm+ is an +XmlMarkup+ object. +# +# xm.em("emphasized") # => emphasized +# xm.em { xm.b("emp & bold") } # => emph & bold +# xm.a("A Link", "href"=>"http://onestepback.org") +# # => A Link +# xm.div { xm.br } # =>

    +# xm.target("name"=>"compile", "option"=>"fast") +# # => +# # NOTE: order of attributes is not specified. +# +# xm.instruct! # +# xm.html { # +# xm.head { # +# xm.title("History") # History +# } # +# xm.body { # +# xm.comment! "HI" # +# xm.h1("Header") #

    Header

    +# xm.p("paragraph") #

    paragraph

    +# } # +# } # +# +# == Notes: +# +# * The order that attributes are inserted in markup tags is +# undefined. +# +# * Sometimes you wish to insert text without enclosing tags. Use +# the text! method to accomplish this. +# +# Example: +# +# xm.div { #
    +# xm.text! "line"; xm.br # line
    +# xm.text! "another line"; xmbr # another line
    +# } #
    +# +# * The special XML characters <, >, and & are converted to <, +# > and & automatically. Use the << operation to +# insert text without modification. +# +# * Sometimes tags use special characters not allowed in ruby +# identifiers. Use the tag! method to handle these +# cases. +# +# Example: +# +# xml.tag!("SOAP:Envelope") { ... } +# +# will produce ... +# +# ... " +# +# tag! will also take text and attribute arguments (after +# the tag name) like normal markup methods. (But see the next +# bullet item for a better way to handle XML namespaces). +# +# * Direct support for XML namespaces is now available. If the +# first argument to a tag call is a symbol, it will be joined to +# the tag to produce a namespace:tag combination. It is easier to +# show this than describe it. +# +# xml.SOAP :Envelope do ... end +# +# Just put a space before the colon in a namespace to produce the +# right form for builder (e.g. "SOAP:Envelope" => +# "xml.SOAP :Envelope") +# +# * XmlMarkup builds the markup in any object (called a _target_) +# that accepts the << method. If no target is given, +# then XmlMarkup defaults to a string target. +# +# Examples: +# +# xm = Builder::XmlMarkup.new +# result = xm.title("yada") +# # result is a string containing the markup. +# +# buffer = "" +# xm = Builder::XmlMarkup.new(buffer) +# # The markup is appended to buffer (using <<) +# +# xm = Builder::XmlMarkup.new(STDOUT) +# # The markup is written to STDOUT (using <<) +# +# xm = Builder::XmlMarkup.new +# x2 = Builder::XmlMarkup.new(:target=>xm) +# # Markup written to +x2+ will be send to +xm+. +# +# * Indentation is enabled by providing the number of spaces to +# indent for each level as a second argument to XmlBuilder.new. +# Initial indentation may be specified using a third parameter. +# +# Example: +# +# xm = Builder.new(:indent=>2) +# # xm will produce nicely formatted and indented XML. +# +# xm = Builder.new(:indent=>2, :margin=>4) +# # xm will produce nicely formatted and indented XML with 2 +# # spaces per indent and an over all indentation level of 4. +# +# builder = Builder::XmlMarkup.new(:target=>$stdout, :indent=>2) +# builder.name { |b| b.first("Jim"); b.last("Weirich) } +# # prints: +# # +# # Jim +# # Weirich +# # +# +# * The instance_eval implementation which forces self to refer to +# the message receiver as self is now obsolete. We now use normal +# block calls to execute the markup block. This means that all +# markup methods must now be explicitly send to the xml builder. +# For instance, instead of +# +# xml.div { strong("text") } +# +# you need to write: +# +# xml.div { xml.strong("text") } +# +# Although more verbose, the subtle change in semantics within the +# block was found to be prone to error. To make this change a +# little less cumbersome, the markup block now gets the markup +# object sent as an argument, allowing you to use a shorter alias +# within the block. +# +# For example: +# +# xml_builder = Builder::XmlMarkup.new +# xml_builder.div { |xml| +# xml.stong("text") +# } +# +# source://builder//lib/builder/xmlmarkup.rb#161 +class Builder::XmlMarkup < ::Builder::XmlBase + # Create an XML markup builder. Parameters are specified by an + # option hash. + # + # :target => target_object:: + # Object receiving the markup. +target_object+ must respond to + # the <<(a_string) operator and return + # itself. The default target is a plain string target. + # + # :indent => indentation:: + # Number of spaces used for indentation. The default is no + # indentation and no line breaks. + # + # :margin => initial_indentation_level:: + # Amount of initial indentation (specified in levels, not + # spaces). + # + # :quote => :single:: + # Use single quotes for attributes rather than double quotes. + # + # :escape_attrs => OBSOLETE:: + # The :escape_attrs option is no longer supported by builder + # (and will be quietly ignored). String attribute values are + # now automatically escaped. If you need unescaped attribute + # values (perhaps you are using entities in the attribute + # values), then give the value as a Symbol. This allows much + # finer control over escaping attribute values. + # + # @return [XmlMarkup] a new instance of XmlMarkup + # + # source://builder//lib/builder/xmlmarkup.rb#190 + def initialize(options = T.unsafe(nil)); end + + # Insert a CDATA section into the XML markup. + # + # For example: + # + # xml.cdata!("text to be included in cdata") + # #=> + # + # source://builder//lib/builder/xmlmarkup.rb#270 + def cdata!(text); end + + # source://builder//lib/builder/xmlmarkup.rb#275 + def cdata_value!(open, text); end + + # source://builder//lib/builder/xmlmarkup.rb#204 + def comment!(comment_text); end + + # Insert an XML declaration into the XML markup. + # + # For example: + # + # xml.declare! :ELEMENT, :blah, "yada" + # # => + # + # source://builder//lib/builder/xmlmarkup.rb#215 + def declare!(inst, *args, &block); end + + # Insert a processing instruction into the XML markup. E.g. + # + # For example: + # + # xml.instruct! + # #=> + # xml.instruct! :aaa, :bbb=>"ccc" + # #=> + # + # Note: If the encoding is setup to "UTF-8" and the value of + # $KCODE is "UTF8", then builder will emit UTF-8 encoded strings + # rather than the entity encoding normally used. + # + # source://builder//lib/builder/xmlmarkup.rb#248 + def instruct!(directive_tag = T.unsafe(nil), attrs = T.unsafe(nil)); end + + # Return the target of the builder. + # + # source://builder//lib/builder/xmlmarkup.rb#200 + def target!; end + + private + + # source://builder//lib/builder/xmlmarkup.rb#326 + def _attr_value(value); end + + # Insert an ending tag. + # + # source://builder//lib/builder/xmlmarkup.rb#310 + def _end_tag(sym); end + + # source://builder//lib/builder/xmlmarkup.rb#335 + def _ensure_no_block(got_block); end + + # Insert the attributes (given in the hash). + # + # source://builder//lib/builder/xmlmarkup.rb#315 + def _insert_attributes(attrs, order = T.unsafe(nil)); end + + # Insert special instruction. + # + # source://builder//lib/builder/xmlmarkup.rb#291 + def _special(open, close, data = T.unsafe(nil), attrs = T.unsafe(nil), order = T.unsafe(nil)); end + + # Start an XML tag. If end_too is true, then the start + # tag is also the end tag (e.g.
    + # + # source://builder//lib/builder/xmlmarkup.rb#302 + def _start_tag(sym, attrs, end_too = T.unsafe(nil)); end + + # Insert text directly in to the builder's target. + # + # source://builder//lib/builder/xmlmarkup.rb#286 + def _text(text); end +end diff --git a/sorbet/rbi/gems/capybara-screenshot@1.0.26.rbi b/sorbet/rbi/gems/capybara-screenshot@1.0.26.rbi new file mode 100644 index 0000000..fca4a76 --- /dev/null +++ b/sorbet/rbi/gems/capybara-screenshot@1.0.26.rbi @@ -0,0 +1,1489 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `capybara-screenshot` gem. +# Please instead update this file by running `bin/tapioca gem capybara-screenshot`. + +# source://capybara-screenshot//lib/capybara-screenshot.rb#1 +module Capybara + class << self + # source://capybara/3.38.0/lib/capybara.rb#389 + def HTML(html); end + + # source://capybara/3.38.0/lib/capybara.rb#182 + def add_selector(name, **options, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def allow_gumbo(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def allow_gumbo=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def always_include_port(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def always_include_port=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def app(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def app=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def app_host(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def app_host=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def asset_host(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def asset_host=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def automatic_label_click(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def automatic_label_click=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def automatic_reload(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def automatic_reload=(*args, **_arg1, &block); end + + # source://capybara/3.38.0/lib/capybara.rb#114 + def configure; end + + # source://capybara/3.38.0/lib/capybara.rb#261 + def current_driver; end + + # source://capybara/3.38.0/lib/capybara.rb#270 + def current_driver=(name); end + + # source://capybara/3.38.0/lib/capybara.rb#316 + def current_session; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def default_driver(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def default_driver=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def default_host(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def default_host=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def default_max_wait_time(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def default_max_wait_time=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def default_normalize_ws(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def default_normalize_ws=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def default_retry_interval(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def default_retry_interval=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def default_selector(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def default_selector=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def default_set_options(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def default_set_options=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def disable_animation(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def disable_animation=(*args, **_arg1, &block); end + + # source://capybara/3.38.0/lib/capybara.rb#204 + def drivers; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def enable_aria_label(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def enable_aria_label=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def enable_aria_role(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def enable_aria_role=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def exact(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def exact=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def exact_text(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def exact_text=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def ignore_hidden_elements(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def ignore_hidden_elements=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def javascript_driver(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def javascript_driver=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def match(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def match=(*args, **_arg1, &block); end + + # source://capybara/3.38.0/lib/capybara.rb#261 + def mode; end + + # source://capybara/3.38.0/lib/capybara.rb#200 + def modify_selector(name, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def predicates_wait(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def predicates_wait=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def raise_server_errors(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def raise_server_errors=(*args, **_arg1, &block); end + + # source://capybara/3.38.0/lib/capybara.rb#131 + def register_driver(name, &block); end + + # source://capybara/3.38.0/lib/capybara.rb#150 + def register_server(name, &block); end + + # source://capybara/3.38.0/lib/capybara.rb#325 + def reset!; end + + # source://capybara/3.38.0/lib/capybara.rb#325 + def reset_sessions!; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def reuse_server(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def reuse_server=(*args, **_arg1, &block); end + + # source://capybara/3.38.0/lib/capybara.rb#253 + def run_default_server(app, port); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def run_server(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def run_server=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def save_path(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def save_path=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def server(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def server=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def server_errors(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def server_errors=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def server_host(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def server_host=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def server_port(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def server_port=(*args, **_arg1, &block); end + + # source://capybara/3.38.0/lib/capybara.rb#208 + def servers; end + + # source://capybara/3.38.0/lib/capybara.rb#337 + def session_name; end + + # source://capybara/3.38.0/lib/capybara.rb#345 + def session_name=(name); end + + # source://capybara/3.38.0/lib/capybara.rb#409 + def session_options; end + + # source://capybara/3.38.0/lib/capybara.rb#240 + def string(html); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def test_id(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def test_id=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def threadsafe(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def threadsafe=(*args, **_arg1, &block); end + + # source://capybara/3.38.0/lib/capybara.rb#282 + def use_default_driver; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def use_html5_parsing(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def use_html5_parsing=(*args, **_arg1, &block); end + + # source://capybara/3.38.0/lib/capybara.rb#290 + def using_driver(driver); end + + # source://capybara-screenshot//lib/capybara-screenshot/capybara.rb#4 + def using_session(name, &block); end + + # source://capybara-screenshot//lib/capybara-screenshot/capybara.rb#4 + def using_session_with_screenshot(name, &block); end + + # source://capybara/3.38.0/lib/capybara.rb#302 + def using_wait_time(seconds); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def visible_text_only(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def visible_text_only=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def w3c_click_offset(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def w3c_click_offset=(*args, **_arg1, &block); end + + private + + # source://capybara/3.38.0/lib/capybara.rb#415 + def config; end + + # source://capybara/3.38.0/lib/capybara.rb#419 + def session_pool; end + + # source://capybara/3.38.0/lib/capybara.rb#425 + def specified_session; end + + # source://capybara/3.38.0/lib/capybara.rb#433 + def specified_session=(session); end + end +end + +# source://capybara-screenshot//lib/capybara-screenshot/capybara.rb#18 +module Capybara::DSL + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def accept_alert(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def accept_confirm(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def accept_prompt(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def all(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def assert_all_of_selectors(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def assert_any_of_selectors(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def assert_current_path(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def assert_no_current_path(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def assert_no_selector(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def assert_no_text(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def assert_no_title(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def assert_none_of_selectors(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def assert_selector(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def assert_text(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def assert_title(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def attach_file(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def body(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def check(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def choose(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def click(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def click_button(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def click_link(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def click_link_or_button(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def click_on(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def current_host(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def current_path(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def current_scope(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def current_url(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def current_window(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def dismiss_confirm(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def dismiss_prompt(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def double_click(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def evaluate_async_script(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def evaluate_script(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def execute_script(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def fill_in(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def find(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def find_all(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def find_button(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def find_by_id(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def find_field(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def find_link(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def first(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def go_back(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def go_forward(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_button?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_checked_field?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_content?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_css?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_current_path?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_field?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_link?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_no_button?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_no_checked_field?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_no_content?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_no_css?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_no_current_path?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_no_field?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_no_link?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_no_select?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_no_selector?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_no_table?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_no_text?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_no_title?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_no_unchecked_field?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_no_xpath?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_select?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_selector?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_table?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_text?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_title?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_unchecked_field?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def has_xpath?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def html(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def open_new_window(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#45 + def page; end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def query(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def refresh(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def refute_selector(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def reset_session!(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def response_headers(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def right_click(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def save_and_open_page(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def save_and_open_screenshot(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def save_page(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def save_screenshot(*_arg0, **_arg1, &_arg2); end + + # source://capybara-screenshot//lib/capybara-screenshot/capybara.rb#26 + def screenshot_and_open_image; end + + # Adds class methods to Capybara module and gets mixed into + # the current scope during Cucumber and RSpec tests + # + # source://capybara-screenshot//lib/capybara-screenshot/capybara.rb#22 + def screenshot_and_save_page; end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def scroll_by(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def scroll_to(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def select(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def send_keys(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def source(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def status_code(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def switch_to_frame(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def switch_to_window(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def text(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def title(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def uncheck(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def unselect(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#21 + def using_session(name_or_session, &block); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#27 + def using_wait_time(seconds, &block); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def visit(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def window_opened_by(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def windows(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def within(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def within_element(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def within_fieldset(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def within_frame(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def within_table(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#51 + def within_window(*_arg0, **_arg1, &_arg2); end + + class << self + # source://capybara/3.38.0/lib/capybara/dsl.rb#12 + def extended(base); end + + # source://capybara/3.38.0/lib/capybara/dsl.rb#7 + def included(base); end + end +end + +# source://capybara-screenshot//lib/capybara-screenshot.rb#2 +module Capybara::Screenshot + class << self + # source://capybara-screenshot//lib/capybara-screenshot.rb#108 + def after_save_html(&block); end + + # source://capybara-screenshot//lib/capybara-screenshot.rb#112 + def after_save_screenshot(&block); end + + # Returns the value of attribute append_random. + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#8 + def append_random; end + + # Sets the attribute append_random + # + # @param value the value to set the attribute append_random to. + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#8 + def append_random=(_arg0); end + + # source://capybara-screenshot//lib/capybara-screenshot.rb#26 + def append_screenshot_path=(value); end + + # Returns the value of attribute append_timestamp. + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#7 + def append_timestamp; end + + # Sets the attribute append_timestamp + # + # @param value the value to set the attribute append_timestamp to. + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#7 + def append_timestamp=(_arg0); end + + # Returns the value of attribute autosave_on_failure. + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#4 + def autosave_on_failure; end + + # Sets the attribute autosave_on_failure + # + # @param value the value to set the attribute autosave_on_failure to. + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#4 + def autosave_on_failure=(_arg0); end + + # source://capybara-screenshot//lib/capybara-screenshot.rb#60 + def capybara_root; end + + # If the path isn't set, default to the current directory + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#119 + def capybara_tmp_path; end + + # Configure the path unless '.' + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#130 + def capybara_tmp_path=(path); end + + # source://capybara-screenshot//lib/capybara-screenshot.rb#54 + def filename_prefix_for(test_type, test); end + + # Returns the value of attribute filename_prefix_formatters. + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#6 + def filename_prefix_formatters; end + + # Sets the attribute filename_prefix_formatters + # + # @param value the value to set the attribute filename_prefix_formatters to. + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#6 + def filename_prefix_formatters=(_arg0); end + + # source://capybara-screenshot//lib/capybara-screenshot.rb#80 + def final_session_name; end + + # Sets the attribute final_session_name + # + # @param value the value to set the attribute final_session_name to. + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#10 + def final_session_name=(_arg0); end + + # source://capybara-screenshot//lib/capybara-screenshot.rb#97 + def new_saver(*args); end + + # Prune screenshots based on prune_strategy + # Will run only once unless force:true + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#86 + def prune(options = T.unsafe(nil)); end + + # Returns the value of attribute prune_strategy. + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#11 + def prune_strategy; end + + # Sets the attribute prune_strategy + # + # @param value the value to set the attribute prune_strategy to. + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#11 + def prune_strategy=(_arg0); end + + # source://capybara-screenshot//lib/capybara-screenshot.rb#72 + def register_driver(driver, &block); end + + # source://capybara-screenshot//lib/capybara-screenshot.rb#76 + def register_filename_prefix_formatter(test_type, &block); end + + # Returns the value of attribute registered_drivers. + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#5 + def registered_drivers; end + + # Sets the attribute registered_drivers + # + # @param value the value to set the attribute registered_drivers to. + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#5 + def registered_drivers=(_arg0); end + + # Reset prune history allowing further prunining on next failure + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#93 + def reset_prune_history; end + + # Returns the value of attribute s3_configuration. + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#12 + def s3_configuration; end + + # Sets the attribute s3_configuration + # + # @param value the value to set the attribute s3_configuration to. + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#12 + def s3_configuration=(_arg0); end + + # Returns the value of attribute s3_object_configuration. + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#13 + def s3_object_configuration; end + + # Sets the attribute s3_object_configuration + # + # @param value the value to set the attribute s3_object_configuration to. + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#13 + def s3_object_configuration=(_arg0); end + + # source://capybara-screenshot//lib/capybara-screenshot.rb#39 + def screen_shot_and_open_image; end + + # source://capybara-screenshot//lib/capybara-screenshot.rb#32 + def screen_shot_and_save_page; end + + # source://capybara-screenshot//lib/capybara-screenshot.rb#39 + def screenshot_and_open_image; end + + # source://capybara-screenshot//lib/capybara-screenshot.rb#32 + def screenshot_and_save_page; end + + # Returns the value of attribute webkit_options. + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#9 + def webkit_options; end + + # Sets the attribute webkit_options + # + # @param value the value to set the attribute webkit_options to. + # + # source://capybara-screenshot//lib/capybara-screenshot.rb#9 + def webkit_options=(_arg0); end + end +end + +# source://capybara-screenshot//lib/capybara-screenshot/callbacks.rb#3 +module Capybara::Screenshot::Callbacks + include ::Capybara::Screenshot::Callbacks::InstanceMethods + + mixes_in_class_methods ::Capybara::Screenshot::Callbacks::ClassMethods + + class << self + # @private + # + # source://capybara-screenshot//lib/capybara-screenshot/callbacks.rb#38 + def included(receiver); end + end +end + +# source://capybara-screenshot//lib/capybara-screenshot/callbacks.rb#4 +class Capybara::Screenshot::Callbacks::CallbackSet < ::Array + # source://capybara-screenshot//lib/capybara-screenshot/callbacks.rb#5 + def call(*args); end +end + +# source://capybara-screenshot//lib/capybara-screenshot/callbacks.rb#12 +module Capybara::Screenshot::Callbacks::ClassMethods + # source://capybara-screenshot//lib/capybara-screenshot/callbacks.rb#13 + def callbacks; end + + # source://capybara-screenshot//lib/capybara-screenshot/callbacks.rb#17 + def define_callback(name); end + + # source://capybara-screenshot//lib/capybara-screenshot/callbacks.rb#25 + def run_callbacks(name, *args); end +end + +# source://capybara-screenshot//lib/capybara-screenshot/callbacks.rb#32 +module Capybara::Screenshot::Callbacks::InstanceMethods + # source://capybara-screenshot//lib/capybara-screenshot/callbacks.rb#33 + def run_callbacks(name, *args); end +end + +# source://capybara-screenshot//lib/capybara-screenshot/pruner.rb#3 +class Capybara::Screenshot::Pruner + # @return [Pruner] a new instance of Pruner + # + # source://capybara-screenshot//lib/capybara-screenshot/pruner.rb#6 + def initialize(strategy); end + + # source://capybara-screenshot//lib/capybara-screenshot/pruner.rb#24 + def prune_old_screenshots; end + + # Returns the value of attribute strategy. + # + # source://capybara-screenshot//lib/capybara-screenshot/pruner.rb#4 + def strategy; end + + private + + # source://capybara-screenshot//lib/capybara-screenshot/pruner.rb#38 + def prune_with_last_run_strategy; end + + # source://capybara-screenshot//lib/capybara-screenshot/pruner.rb#42 + def prune_with_numeric_strategy(count); end + + # source://capybara-screenshot//lib/capybara-screenshot/pruner.rb#30 + def strategy_proc; end + + # source://capybara-screenshot//lib/capybara-screenshot/pruner.rb#34 + def wildcard_path; end +end + +# source://capybara-screenshot//lib/capybara-screenshot/saver.rb#6 +class Capybara::Screenshot::Saver + include ::Capybara::Screenshot::Callbacks + include ::Capybara::Screenshot::Callbacks::InstanceMethods + extend ::Capybara::Screenshot::Callbacks::ClassMethods + + # @return [Saver] a new instance of Saver + # + # source://capybara-screenshot//lib/capybara-screenshot/saver.rb#14 + def initialize(capybara, page, html_save = T.unsafe(nil), filename_prefix = T.unsafe(nil)); end + + # Returns the value of attribute capybara. + # + # source://capybara-screenshot//lib/capybara-screenshot/saver.rb#12 + def capybara; end + + # If Capybara::Screenshot.capybara_tmp_path is set then + # the html_path or screenshot_path can be appended to this path in + # some versions of Capybara instead of using it as an absolute path + # + # source://capybara-screenshot//lib/capybara-screenshot/saver.rb#94 + def clear_save_path; end + + # Print image to screen, if imgcat is available + # + # source://capybara-screenshot//lib/capybara-screenshot/saver.rb#108 + def display_image; end + + # Returns the value of attribute file_base_name. + # + # source://capybara-screenshot//lib/capybara-screenshot/saver.rb#12 + def file_base_name; end + + # source://capybara-screenshot//lib/capybara-screenshot/saver.rb#75 + def html_path; end + + # @return [Boolean] + # + # source://capybara-screenshot//lib/capybara-screenshot/saver.rb#83 + def html_saved?; end + + # source://capybara-screenshot//lib/capybara-screenshot/saver.rb#102 + def output_screenshot_path; end + + # Returns the value of attribute page. + # + # source://capybara-screenshot//lib/capybara-screenshot/saver.rb#12 + def page; end + + # source://capybara-screenshot//lib/capybara-screenshot/saver.rb#28 + def save; end + + # source://capybara-screenshot//lib/capybara-screenshot/saver.rb#50 + def save_html; end + + # source://capybara-screenshot//lib/capybara-screenshot/saver.rb#63 + def save_screenshot; end + + # source://capybara-screenshot//lib/capybara-screenshot/saver.rb#79 + def screenshot_path; end + + # @return [Boolean] + # + # source://capybara-screenshot//lib/capybara-screenshot/saver.rb#87 + def screenshot_saved?; end + + private + + # @yield [path] + # + # source://capybara-screenshot//lib/capybara-screenshot/saver.rb#114 + def current_path; end + + # source://capybara-screenshot//lib/capybara-screenshot/saver.rb#128 + def imgcat; end + + # source://capybara-screenshot//lib/capybara-screenshot/saver.rb#124 + def output(message); end + + # Cross-platform way of finding an executable in the $PATH. + # + # which('ruby') #=> /usr/bin/ruby + # + # source://capybara-screenshot//lib/capybara-screenshot/saver.rb#135 + def which(cmd); end + + # source://capybara-screenshot//lib/capybara-screenshot/saver.rb#148 + def within_offending_window; end + + class << self + # source://capybara-screenshot//lib/capybara-screenshot/callbacks.rb#20 + def after_save_html(&block); end + + # source://capybara-screenshot//lib/capybara-screenshot/callbacks.rb#20 + def after_save_screenshot(&block); end + end +end + +class Capybara::Session + include ::Capybara::SessionScreenshotOverrides + + # source://capybara/3.38.0/lib/capybara/session.rb#78 + def initialize(mode, app = T.unsafe(nil)); end + + # source://capybara/3.38.0/lib/capybara/session.rb#658 + def accept_alert(text = T.unsafe(nil), **options, &blk); end + + # source://capybara/3.38.0/lib/capybara/session.rb#668 + def accept_confirm(text = T.unsafe(nil), **options, &blk); end + + # source://capybara/3.38.0/lib/capybara/session.rb#689 + def accept_prompt(text = T.unsafe(nil), **options, &blk); end + + # source://capybara/3.38.0/lib/capybara/session.rb#322 + def active_element; end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def all(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#75 + def app; end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def assert_all_of_selectors(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def assert_any_of_selectors(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def assert_no_selector(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def assert_no_text(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#780 + def assert_no_title(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def assert_none_of_selectors(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def assert_selector(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def assert_text(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#780 + def assert_title(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def attach_file(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#196 + def body; end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def check(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def choose(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#129 + def cleanup!; end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def click(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def click_button(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def click_link(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def click_link_or_button(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def click_on(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#828 + def config; end + + # source://capybara/3.38.0/lib/capybara/session.rb#818 + def configure; end + + # source://capybara/3.38.0/lib/capybara/session.rb#221 + def current_host; end + + # source://capybara/3.38.0/lib/capybara/session.rb#206 + def current_path; end + + # source://capybara/3.38.0/lib/capybara/session.rb#790 + def current_scope; end + + # source://capybara/3.38.0/lib/capybara/session.rb#230 + def current_url; end + + # source://capybara/3.38.0/lib/capybara/session.rb#459 + def current_window; end + + # source://capybara/3.38.0/lib/capybara/session.rb#678 + def dismiss_confirm(text = T.unsafe(nil), **options, &blk); end + + # source://capybara/3.38.0/lib/capybara/session.rb#699 + def dismiss_prompt(text = T.unsafe(nil), **options, &blk); end + + # source://capybara/3.38.0/lib/capybara/session.rb#765 + def document; end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def double_click(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#99 + def driver; end + + # source://capybara/3.38.0/lib/capybara/session.rb#632 + def evaluate_async_script(script, *args); end + + # source://capybara/3.38.0/lib/capybara/session.rb#618 + def evaluate_script(script, *args); end + + # source://capybara/3.38.0/lib/capybara/session.rb#603 + def execute_script(script, *args); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def fill_in(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def find(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def find_all(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def find_button(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def find_by_id(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def find_field(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def find_link(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def first(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#296 + def go_back; end + + # source://capybara/3.38.0/lib/capybara/session.rb#304 + def go_forward; end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_button?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_checked_field?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_content?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_css?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_field?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_link?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_no_button?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_no_checked_field?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_no_content?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_no_css?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_no_field?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_no_link?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_no_select?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_no_selector?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_no_table?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_no_text?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#780 + def has_no_title?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_no_unchecked_field?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_no_xpath?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_select?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_selector?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_table?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_text?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#780 + def has_title?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_unchecked_field?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def has_xpath?(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#196 + def html; end + + # source://capybara/3.38.0/lib/capybara/session.rb#786 + def inspect; end + + # source://capybara/3.38.0/lib/capybara/session.rb#75 + def mode; end + + # source://capybara/3.38.0/lib/capybara/session.rb#483 + def open_new_window(kind = T.unsafe(nil)); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def query(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#146 + def quit; end + + # source://capybara/3.38.0/lib/capybara/session.rb#157 + def raise_server_error!; end + + # source://capybara/3.38.0/lib/capybara/session.rb#287 + def refresh; end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def refute_selector(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#129 + def reset!; end + + # source://capybara/3.38.0/lib/capybara/session.rb#129 + def reset_session!; end + + # source://capybara/3.38.0/lib/capybara/session.rb#178 + def response_headers; end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def right_click(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#731 + def save_and_open_page(path = T.unsafe(nil)); end + + # source://capybara/3.38.0/lib/capybara/session.rb#761 + def save_and_open_screenshot(path = T.unsafe(nil), **options); end + + # source://capybara/3.38.0/lib/capybara/session.rb#715 + def save_page(path = T.unsafe(nil)); end + + # source://capybara/3.38.0/lib/capybara/session.rb#746 + def save_screenshot(path = T.unsafe(nil), **options); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def scroll_by(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def scroll_to(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def select(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#312 + def send_keys(*args, **kw_args); end + + # source://capybara/3.38.0/lib/capybara/session.rb#75 + def server; end + + # source://capybara/3.38.0/lib/capybara/session.rb#836 + def server_url; end + + # source://capybara/3.38.0/lib/capybara/session.rb#196 + def source; end + + # source://capybara/3.38.0/lib/capybara/session.rb#188 + def status_code; end + + # source://capybara/3.38.0/lib/capybara/session.rb#407 + def switch_to_frame(frame); end + + # source://capybara/3.38.0/lib/capybara/session.rb#511 + def switch_to_window(window = T.unsafe(nil), **options, &window_locator); end + + # source://capybara/3.38.0/lib/capybara/session.rb#76 + def synchronized; end + + # source://capybara/3.38.0/lib/capybara/session.rb#76 + def synchronized=(_arg0); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def text(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#780 + def title(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def uncheck(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#771 + def unselect(*_arg0, **_arg1, &_arg2); end + + # source://capybara/3.38.0/lib/capybara/session.rb#799 + def using_wait_time(seconds, &block); end + + # source://capybara/3.38.0/lib/capybara/session.rb#260 + def visit(visit_uri); end + + # source://capybara/3.38.0/lib/capybara/session.rb#580 + def window_opened_by(**options); end + + # source://capybara/3.38.0/lib/capybara/session.rb#470 + def windows; end + + # source://capybara/3.38.0/lib/capybara/session.rb#361 + def within(*args, **kw_args); end + + # source://capybara/3.38.0/lib/capybara/session.rb#361 + def within_element(*args, **kw_args); end + + # source://capybara/3.38.0/lib/capybara/session.rb#378 + def within_fieldset(locator, &block); end + + # source://capybara/3.38.0/lib/capybara/session.rb#447 + def within_frame(*args, **kw_args); end + + # source://capybara/3.38.0/lib/capybara/session.rb#388 + def within_table(locator, &block); end + + # source://capybara-screenshot//lib/capybara-screenshot/capybara.rb#32 + def within_window(window_or_handle); end + + private + + # source://capybara/3.38.0/lib/capybara/session.rb#901 + def _find_frame(*args, **kw_args); end + + # source://capybara/3.38.0/lib/capybara/session.rb#917 + def _switch_to_window(window = T.unsafe(nil), **options, &window_locator); end + + # source://capybara/3.38.0/lib/capybara/session.rb#937 + def _switch_to_window_by_locator; end + + # source://capybara/3.38.0/lib/capybara/session.rb#848 + def accept_modal(type, text_or_options, options, &blk); end + + # source://capybara/3.38.0/lib/capybara/session.rb#897 + def adjust_server_port(uri); end + + # source://capybara/3.38.0/lib/capybara/session.rb#875 + def default_fn(extension); end + + # source://capybara/3.38.0/lib/capybara/session.rb#852 + def dismiss_modal(type, text_or_options, options, &blk); end + + # source://capybara/3.38.0/lib/capybara/session.rb#844 + def driver_args(args); end + + # source://capybara/3.38.0/lib/capybara/session.rb#884 + def element_script_result(arg); end + + # source://capybara/3.38.0/lib/capybara/session.rb#856 + def modal_options(text = T.unsafe(nil), **options); end + + # source://capybara/3.38.0/lib/capybara/session.rb#862 + def open_file(path); end + + # source://capybara/3.38.0/lib/capybara/session.rb#869 + def prepare_path(path, extension); end + + # source://capybara/3.38.0/lib/capybara/session.rb#880 + def scopes; end + + # source://capybara/3.38.0/lib/capybara/session.rb#945 + def synchronize_windows(options, &block); end + + class << self + # source://capybara/3.38.0/lib/capybara/session.rb#824 + def instance_created?; end + end +end + +# source://capybara-screenshot//lib/capybara-screenshot/capybara.rb#31 +module Capybara::SessionScreenshotOverrides + # source://capybara-screenshot//lib/capybara-screenshot/capybara.rb#32 + def within_window(window_or_handle); end +end + +# source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#1 +class CapybaraScreenshot; end + +# source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#2 +module CapybaraScreenshot::Helpers + extend ::CapybaraScreenshot::Helpers + + # source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#19 + def black(text); end + + # source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#19 + def blue(text); end + + # source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#23 + def bright_black(text); end + + # source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#23 + def bright_blue(text); end + + # source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#23 + def bright_cyan(text); end + + # source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#23 + def bright_green(text); end + + # source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#23 + def bright_magenta(text); end + + # source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#23 + def bright_purple(text); end + + # source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#23 + def bright_red(text); end + + # source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#23 + def bright_white(text); end + + # source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#23 + def bright_yellow(text); end + + # source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#19 + def cyan(text); end + + # source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#19 + def green(text); end + + # source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#19 + def magenta(text); end + + # source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#19 + def purple(text); end + + # source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#19 + def red(text); end + + # source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#19 + def white(text); end + + # source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#19 + def yellow(text); end +end + +# source://capybara-screenshot//lib/capybara-screenshot/helpers.rb#5 +CapybaraScreenshot::Helpers::COLORS = T.let(T.unsafe(nil), Hash) diff --git a/sorbet/rbi/gems/capybara@3.38.0.rbi b/sorbet/rbi/gems/capybara@3.38.0.rbi new file mode 100644 index 0000000..31f9493 --- /dev/null +++ b/sorbet/rbi/gems/capybara@3.38.0.rbi @@ -0,0 +1,9588 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `capybara` gem. +# Please instead update this file by running `bin/tapioca gem capybara`. + +# source://capybara//lib/capybara/session/config.rb#5 +module Capybara + extend ::Capybara::DSL + + class << self + # Parse raw html into a document using Nokogiri, and adjust textarea contents as defined by the spec. + # + # @param html [String] The raw html + # @return [Nokogiri::HTML::Document] HTML document + # + # source://capybara//lib/capybara.rb#389 + def HTML(html); end + + # Add a new selector to Capybara. Selectors can be used by various methods in Capybara + # to find certain elements on the page in a more convenient way. For example adding a + # selector to find certain table rows might look like this: + # + # Capybara.add_selector(:row) do + # xpath { |num| ".//tbody/tr[#{num}]" } + # end + # + # This makes it possible to use this selector in a variety of ways: + # + # find(:row, 3) + # page.find('table#myTable').find(:row, 3).text + # page.find('table#myTable').has_selector?(:row, 3) + # within(:row, 3) { expect(page).to have_content('$100.000') } + # + # Here is another example: + # + # Capybara.add_selector(:id) do + # xpath { |id| XPath.descendant[XPath.attr(:id) == id.to_s] } + # end + # + # Note that this particular selector already ships with Capybara. + # + # @param name [Symbol] The name of the selector to add + # @yield A block executed in the context of the new {Capybara::Selector} + # + # source://capybara//lib/capybara.rb#182 + def add_selector(name, **options, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def allow_gumbo(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def allow_gumbo=(*args, **_arg1, &block); end + + # See {Capybara.configure} + # + # source://forwardable/1.3.2/forwardable.rb#229 + def always_include_port(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def always_include_port=(*args, **_arg1, &block); end + + # See {Capybara.configure} + # + # source://forwardable/1.3.2/forwardable.rb#229 + def app(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def app=(*args, **_arg1, &block); end + + # See {Capybara.configure} + # + # source://forwardable/1.3.2/forwardable.rb#229 + def app_host(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def app_host=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def asset_host(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def asset_host=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def automatic_label_click(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def automatic_label_click=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def automatic_reload(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def automatic_reload=(*args, **_arg1, &block); end + + # Configure Capybara to suit your needs. + # + # Capybara.configure do |config| + # config.run_server = false + # config.app_host = 'http://www.google.com' + # end + # + # #### Configurable options + # + # - **use_html5_parsing** (Boolean = `false`) - When Nokogiri >= 1.12.0 or `nokogumbo` is installed, whether HTML5 parsing will be used for HTML strings. + # - **always_include_port** (Boolean = `false`) - Whether the Rack server's port should automatically be inserted into every visited URL + # unless another port is explicitly specified. + # - **app_host** (String, `nil`) - The default host to use when giving a relative URL to visit, must be a valid URL e.g. `http://www.example.com`. + # - **asset_host** (String = `nil`) - Where dynamic assets are hosted - will be prepended to relative asset locations if present. + # - **automatic_label_click** (Boolean = `false`) - Whether {Capybara::Node::Element#choose Element#choose}, {Capybara::Node::Element#check Element#check}, + # {Capybara::Node::Element#uncheck Element#uncheck} will attempt to click the associated `